CScriptMazeNode: Always free CMazeState

This commit is contained in:
Luke Street 2020-09-21 20:56:44 -04:00
parent a35bfc49b5
commit dbbb3cdc4e
1 changed files with 5 additions and 3 deletions

View File

@ -173,11 +173,13 @@ void CScriptMazeNode::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, C
sDebugCellPos[xe8_col + xec_row * skMazeCols] = GetTranslation() - zeus::CVector3f{1.1875f, -0.1215f, 1.2187f}; sDebugCellPos[xe8_col + xec_row * skMazeCols] = GetTranslation() - zeus::CVector3f{1.1875f, -0.1215f, 1.2187f};
} }
#endif #endif
} else if (msg == EScriptObjectMessage::Deleted) {
mgr.ClearCurrentMaze();
Reset(mgr);
} }
} }
// URDE change: used to be in the above if branch
if (msg == EScriptObjectMessage::Deleted) {
mgr.ClearCurrentMaze();
Reset(mgr);
}
CActor::AcceptScriptMsg(msg, uid, mgr); CActor::AcceptScriptMsg(msg, uid, mgr);
} }