Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix Cheat menu debug script loader
- Loading branch information
Showing
with
4 additions
and
0 deletions.
-
+4
−0
src/control/Script.cpp
There are no files selected for viewing
|
|
@@ -4390,7 +4390,11 @@ CTheScripts::SwitchToMission(int32 mission) |
|
CTimer::Suspend();
|
|
CTimer::Suspend();
|
|
int offset = CTheScripts::MultiScriptArray[mission];
|
|
int offset = CTheScripts::MultiScriptArray[mission];
|
|
CFileMgr::ChangeDir("\\");
|
|
CFileMgr::ChangeDir("\\");
|
|
|
|
#ifdef USE_DEBUG_SCRIPT_LOADER
|
|
|
|
int handle = open_script();
|
|
|
|
#else
|
|
int handle = CFileMgr::OpenFile("data\\main.scm", "rb");
|
|
int handle = CFileMgr::OpenFile("data\\main.scm", "rb");
|
|
|
|
#endif
|
|
CFileMgr::Seek(handle, offset, 0);
|
|
CFileMgr::Seek(handle, offset, 0);
|
|
CFileMgr::Read(handle, (const char*)&CTheScripts::ScriptSpace[SIZE_MAIN_SCRIPT], SIZE_MISSION_SCRIPT);
|
|
CFileMgr::Read(handle, (const char*)&CTheScripts::ScriptSpace[SIZE_MAIN_SCRIPT], SIZE_MISSION_SCRIPT);
|
|
CFileMgr::CloseFile(handle);
|
|
CFileMgr::CloseFile(handle);
|
|
|
|