Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Fix Cheat menu debug script loader
  • Loading branch information
Nopey committed Jul 10, 2021
1 parent 33c45e4 commit 12efd1209bedcd3ad7e572fc600c59846cd9f119
Showing with 4 additions and 0 deletions.
  1. +4 −0 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);

0 comments on commit 12efd12

Please sign in to comment.