summaryrefslogtreecommitdiffstats
path: root/src/control/Script.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-12-12 10:24:55 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-12-12 10:24:55 +0100
commit4197498e2dab59916c0a41843b430d8a26b485f9 (patch)
treea79b612c1d1874219315da549943a55d25861f52 /src/control/Script.cpp
parentMerge pull request #869 from Nick007J/miami (diff)
downloadre3-4197498e2dab59916c0a41843b430d8a26b485f9.tar
re3-4197498e2dab59916c0a41843b430d8a26b485f9.tar.gz
re3-4197498e2dab59916c0a41843b430d8a26b485f9.tar.bz2
re3-4197498e2dab59916c0a41843b430d8a26b485f9.tar.lz
re3-4197498e2dab59916c0a41843b430d8a26b485f9.tar.xz
re3-4197498e2dab59916c0a41843b430d8a26b485f9.tar.zst
re3-4197498e2dab59916c0a41843b430d8a26b485f9.zip
Diffstat (limited to '')
-rw-r--r--src/control/Script.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index ff72d664..8638abe8 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -2332,6 +2332,7 @@ CRunningScript* CTheScripts::StartNewScript(uint32 ip)
pNew->Init();
pNew->SetIP(ip);
pNew->AddScriptToList(&pActiveScripts);
+ pNew->m_bIsActive = true;
return pNew;
}
@@ -2416,6 +2417,8 @@ void CTheScripts::Process()
script->UpdateTimers(timeStep);
script->Process();
script = next;
+ if (script && !script->m_bIsActive)
+ script = nil;
}
DbgFlag = false;
#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT