summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorMagnus Larsen <golgothasTerror101@gmail.com>2021-07-10 19:18:32 +0200
committerMagnus Larsen <golgothasTerror101@gmail.com>2021-07-10 19:18:32 +0200
commit12efd1209bedcd3ad7e572fc600c59846cd9f119 (patch)
tree4cbbab4ec831a58a8b62c5268391625c082a795d /src/control
parentFix debug script loader crashing missions (diff)
downloadre3-12efd1209bedcd3ad7e572fc600c59846cd9f119.tar
re3-12efd1209bedcd3ad7e572fc600c59846cd9f119.tar.gz
re3-12efd1209bedcd3ad7e572fc600c59846cd9f119.tar.bz2
re3-12efd1209bedcd3ad7e572fc600c59846cd9f119.tar.lz
re3-12efd1209bedcd3ad7e572fc600c59846cd9f119.tar.xz
re3-12efd1209bedcd3ad7e572fc600c59846cd9f119.tar.zst
re3-12efd1209bedcd3ad7e572fc600c59846cd9f119.zip
Diffstat (limited to 'src/control')
-rw-r--r--src/control/Script.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 09891765..b07c0701 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -4390,7 +4390,11 @@ CTheScripts::SwitchToMission(int32 mission)
CTimer::Suspend();
int offset = CTheScripts::MultiScriptArray[mission];
CFileMgr::ChangeDir("\\");
+#ifdef USE_DEBUG_SCRIPT_LOADER
+ int handle = open_script();
+#else
int handle = CFileMgr::OpenFile("data\\main.scm", "rb");
+#endif
CFileMgr::Seek(handle, offset, 0);
CFileMgr::Read(handle, (const char*)&CTheScripts::ScriptSpace[SIZE_MAIN_SCRIPT], SIZE_MISSION_SCRIPT);
CFileMgr::CloseFile(handle);