diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2021-08-03 21:20:14 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2021-08-03 21:20:14 +0200 |
commit | 80d00fe31a191e5c5151509109957ab1f0ecc5e7 (patch) | |
tree | 76508de131afa99407048a9d20d3f3101ed24ce6 | |
parent | cherrypick fixes (diff) | |
download | re3-80d00fe31a191e5c5151509109957ab1f0ecc5e7.tar re3-80d00fe31a191e5c5151509109957ab1f0ecc5e7.tar.gz re3-80d00fe31a191e5c5151509109957ab1f0ecc5e7.tar.bz2 re3-80d00fe31a191e5c5151509109957ab1f0ecc5e7.tar.lz re3-80d00fe31a191e5c5151509109957ab1f0ecc5e7.tar.xz re3-80d00fe31a191e5c5151509109957ab1f0ecc5e7.tar.zst re3-80d00fe31a191e5c5151509109957ab1f0ecc5e7.zip |
-rw-r--r-- | src/control/Script.cpp | 2 | ||||
-rw-r--r-- | src/control/ScriptDebug.cpp | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp index e57d1528..ca250f29 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -1049,7 +1049,7 @@ int8 CRunningScript::ProcessOneCommand() #endif { #ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT - LogAfterProcessingCommand(command); + LogAfterProcessingCommand(command); #elif defined USE_BASIC_SCRIPT_DEBUG_OUTPUT if (m_bMissionFlag) { char tmp[128]; diff --git a/src/control/ScriptDebug.cpp b/src/control/ScriptDebug.cpp index 9e880b5e..856b30bd 100644 --- a/src/control/ScriptDebug.cpp +++ b/src/control/ScriptDebug.cpp @@ -4,10 +4,11 @@ #include "ScriptCommands.h" #include "Debug.h" +#include "FileMgr.h" +#include "GameLogic.h" #ifdef MISSION_REPLAY #include "GenericGameStorage.h" #endif -#include "FileMgr.h" #include "Messages.h" #include "Timer.h" #include "Stats.h" @@ -1728,6 +1729,9 @@ CTheScripts::SwitchToMission(int32 mission) CMessages::ClearMessages(); } + if (CTheScripts::NumberOfExclusiveMissionScripts > 0 && mission <= UINT16_MAX - 2) + return; + #ifdef MISSION_REPLAY missionRetryScriptIndex = mission; #ifdef USE_MISSION_REPLAY_OVERRIDE_FOR_NON_MOBILE_SCRIPT @@ -1738,7 +1742,6 @@ CTheScripts::SwitchToMission(int32 mission) #endif CTimer::Suspend(); int offset = CTheScripts::MultiScriptArray[mission]; - CFileMgr::ChangeDir("\\"); #ifdef USE_DEBUG_SCRIPT_LOADER CFileMgr::ChangeDir("\\data\\"); int handle = CFileMgr::OpenFile(scriptfile, "rb"); @@ -1755,5 +1758,6 @@ CTheScripts::SwitchToMission(int32 mission) pMissionScript->m_bIsMissionScript = true; pMissionScript->m_bMissionFlag = true; CTheScripts::bAlreadyRunningAMissionScript = true; + CGameLogic::ClearShortCut(); } #endif |