diff options
Diffstat (limited to 'src/control')
-rw-r--r-- | src/control/Script.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 17572531..7712a335 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -50,7 +50,7 @@ #include "Timecycle.h" #include "TxdStore.h" #include "Bike.h" -#include "memoryManager.h" +#include "smallHeap.h" #ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT #include <stdarg.h> #endif @@ -2644,7 +2644,8 @@ bool CTheScripts::Init(bool loaddata) CFileMgr::Read(mainf, (char*)&MainScriptSize, sizeof(MainScriptSize)); int nLargestMissionSize = 0; CFileMgr::Read(mainf, (char*)&nLargestMissionSize, sizeof(nLargestMissionSize)); - // some cSmallHeap shit - TODO + if (!cSmallHeap::msInstance.IsLocked()) + cSmallHeap::msInstance.Lock(); ScriptSpace = (uint8*)base::cMainMemoryManager::Instance()->Allocate(MainScriptSize + nLargestMissionSize); memset(ScriptSpace, 0, MainScriptSize + nLargestMissionSize); CFileMgr::Read(mainf, (char*)ScriptSpace, MainScriptSize); |