File tree Expand file tree Collapse file tree
GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7877,12 +7877,36 @@ void ScriptEngine::setSequentialTimer(Team *team, Int frameCount)
78777877
78787878void ScriptEngine::evaluateAndProgressAllSequentialScripts ( void )
78797879{
7880+ #if (defined(_MSC_VER) && _MSC_VER < 1300) && RETAIL_COMPATIBLE_CRC
7881+ VecSequentialScriptPtrIt it, lastIt;
7882+ lastIt = m_sequentialScripts.end ();
7883+ #else
78807884 VecSequentialScriptPtrIt it;
78817885 SequentialScript* lastScript = NULL ;
7886+ #endif
78827887 Bool itAdvanced = false ;
78837888
78847889 Int spinCount = 0 ;
78857890 for (it = m_sequentialScripts.begin (); it != m_sequentialScripts.end (); /* empty */ ) {
7891+ #if (defined(_MSC_VER) && _MSC_VER < 1300) && RETAIL_COMPATIBLE_CRC
7892+ if (it == lastIt) {
7893+ ++spinCount;
7894+ } else {
7895+ spinCount = 0 ;
7896+ }
7897+
7898+ if (spinCount > MAX_SPIN_COUNT) {
7899+ SequentialScript *seqScript = (*it);
7900+ if (seqScript) {
7901+ DEBUG_LOG ((" Sequential script %s appears to be in an infinite loop.\n " ,
7902+ seqScript->m_scriptToExecuteSequentially ->getName ().str ()));
7903+ }
7904+ ++it;
7905+ continue ;
7906+ }
7907+
7908+ lastIt = it;
7909+ #else
78867910 if ((*it) == lastScript) {
78877911 ++spinCount;
78887912 } else {
@@ -7900,6 +7924,7 @@ void ScriptEngine::evaluateAndProgressAllSequentialScripts( void )
79007924 }
79017925
79027926 lastScript = (*it);
7927+ #endif
79037928
79047929 itAdvanced = false ;
79057930
You can’t perform that action at this time.
0 commit comments