You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The speaker entity has a keyvalue preset used to select a predefined sound to play. The code to select this preset does not handle invalid values and will leave the sound name pointer uninitialized:
CTalkMonster::g_talkWaitTime = gpGlobals->time + 5; // time delay until it's ok to speak: used so that two NPCs don't talk at once
}
Since there is no way for there to be a sentence group with an empty name nothing will be played and the error message in the code above will be printed.
The text was updated successfully, but these errors were encountered:
The
speaker
entity has a keyvaluepreset
used to select a predefined sound to play. The code to select this preset does not handle invalid values and will leave the sound name pointer uninitialized:halflife/dlls/sound.cpp
Lines 1873 to 1894 in c7240b9
To fix this an additional case is required:
Initializing it to an empty string will cause it to enter this branch:
halflife/dlls/sound.cpp
Lines 1903 to 1915 in c7240b9
Since there is no way for there to be a sentence group with an empty name nothing will be played and the error message in the code above will be printed.
The text was updated successfully, but these errors were encountered: