Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVM samples choked off on state change #134

Open
AmProsius opened this issue Feb 17, 2021 · 2 comments
Open

SVM samples choked off on state change #134

AmProsius opened this issue Feb 17, 2021 · 2 comments
Labels
validation: required This issue needs validation from one of the validators.

Comments

@AmProsius
Copy link
Owner

AmProsius commented Feb 17, 2021

Describe the bug
SVM samples might be choked off when the NPC changes their state.

Expected behavior
SVM samples are no longer choked off when the NPC changes their state.

Additional context

//////////////////////////////////////////////////////////////////////////
//    DB_Say
//    ===========
//    Ein Ersatz für B_SayOverlay, das leider durch Bug #3046 beim
//    Zustandwechsel abgewürgt wird, und das ist praktisch immer
//    wenn diese Funktion aufgerufen wird...
//    es werden nur einige B_SayOverlay's ersetzt, manche funzen auch
//////////////////////////////////////////////////////////////////////////
func void DB_Say(var C_NPC slf, var C_Npc oth, var string text)
{
    B_SmartTurnToNpc(slf, oth);

    if ( (slf.voice > 0) && (slf.voice < 15) ) {
        AI_OutputSVM_Overlay(slf, oth, ConcatStrings("$", text)); // Mundbewegung + Textfenster
        Snd_Play3d(slf, ConcatStrings(ConcatStrings("SVM", IntToString(slf.voice)), text) ); // COOL! ;)
    };
};
@AmProsius
Copy link
Owner Author

AmProsius commented Feb 18, 2021

I suppose the fix can be something like this:

func void B_SayOverlay(var C_NPC slf, var C_Npc oth, var string text)
{
var string pipe;
pipe = ConcatStrings("B_SayOverlay: ", text);
PrintDebugNpc (PD_ZS_FRAME, pipe );
B_SmartTurnToNpc (slf, oth);
//SN: VORSICHT: Bug #3046, würgt das SVM-Sample beim Zustandswechsel ab. Soll in v1.01 behoben sein.
AI_OutputSVM_Overlay (slf, oth , text);
};

changed to

func void B_SayOverlay(var C_NPC slf, var C_Npc oth, var string text)
{
    var string pipe;

    pipe = ConcatStrings("B_SayOverlay: ", text);
    PrintDebugNpc       (PD_ZS_FRAME, pipe );

    B_SmartTurnToNpc    (slf, oth);

    if ( (slf.voice > 0) && (slf.voice < 15) ) {
        var string slicedText;

        AI_OutputSVM_Overlay(slf, oth, text);

        slicedText = Substring(text, 1); //AmProsius: Substring is a placeholder for a function that cuts the $ from text.
        Snd_Play3d(slf, ConcatStrings(ConcatStrings("SVM", IntToString(slf.voice)), slicedText) );
    };
};

@AmProsius AmProsius added the validation: required This issue needs validation from one of the validators. label Feb 20, 2021
@szapp
Copy link
Collaborator

szapp commented May 13, 2021

It may be much cleaner to compare the differences between Gothic 1 and Gothic 2 (where the problem does not seem to arise) and solve the problem (possibly on engine level) how it is done in Gothic 2.

@szapp szapp added this to Unsorted in Fix templates Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validation: required This issue needs validation from one of the validators.
Projects
Development

No branches or pull requests

2 participants