TITANIC: Fix crash if you exit the game whilst a bot is talking

This commit is contained in:
Paul Gilbert 2017-09-24 12:39:39 -04:00
parent d9eebaf787
commit a6026fc1fc

View File

@ -130,6 +130,10 @@ bool CTrueTalkNPC::TrueTalkNotifySpeechStartedMsg(CTrueTalkNotifySpeechStartedMs
bool CTrueTalkNPC::TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *msg) {
debugC(DEBUG_DETAILED, kDebugScripts, "%s TrueTalkNotifySpeechEndedMsg flags=%x dialogueId=%d", getName().c_str(), _npcFlags, msg->_dialogueId);
if (!getGameManager())
return false;
_npcFlags &= ~NPCFLAG_SPEAKING;
--_speechCounter;
_speechDuration = 0;