diff options
Diffstat (limited to 'src/save/GenericGameStorage.cpp')
-rw-r--r-- | src/save/GenericGameStorage.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/save/GenericGameStorage.cpp b/src/save/GenericGameStorage.cpp index eff0f2ff..0f583221 100644 --- a/src/save/GenericGameStorage.cpp +++ b/src/save/GenericGameStorage.cpp @@ -29,6 +29,7 @@ #include "Radar.h" #include "Restart.h" #include "Script.h" +#include "SetPieces.h" #include "Stats.h" #include "Streaming.h" #include "Timer.h" @@ -88,6 +89,7 @@ do {\ #define WriteSaveDataBlock(save_func)\ do {\ + size = 0;\ buf = work_buff;\ reserved = 0;\ MakeSpaceForSizeInBufferPointer(presize, buf, postsize);\ @@ -201,6 +203,7 @@ GenericSave(int file) // Save the rest WriteSaveDataBlock(CPools::SavePedPool); WriteSaveDataBlock(CGarages::Save); + WriteSaveDataBlock(CGameLogic::Save); WriteSaveDataBlock(CPools::SaveVehiclePool); WriteSaveDataBlock(CPools::SaveObjectPool); WriteSaveDataBlock(ThePaths.Save); @@ -216,6 +219,7 @@ GenericSave(int file) WriteSaveDataBlock(cAudioScriptObject::SaveAllAudioScriptObjects); WriteSaveDataBlock(CWorld::Players[CWorld::PlayerInFocus].SavePlayerInfo); WriteSaveDataBlock(CStats::SaveStats); + WriteSaveDataBlock(CSetPieces::Save); WriteSaveDataBlock(CStreaming::MemoryCardSave); WriteSaveDataBlock(CPedType::Save); @@ -325,6 +329,8 @@ GenericLoad() LoadSaveDataBlock(); ReadDataFromBlock("Loading Garages \n", CGarages::Load); LoadSaveDataBlock(); + ReadDataFromBlock("Loading GameLogic \n", CGameLogic::Load); + LoadSaveDataBlock(); ReadDataFromBlock("Loading Vehicles \n", CPools::LoadVehiclePool); LoadSaveDataBlock(); CProjectileInfo::RemoveAllProjectiles(); @@ -358,12 +364,14 @@ GenericLoad() LoadSaveDataBlock(); ReadDataFromBlock("Loading Stats \n", CStats::LoadStats); LoadSaveDataBlock(); + ReadDataFromBlock("Loading Set Pieces \n", CSetPieces::Load); + LoadSaveDataBlock(); ReadDataFromBlock("Loading Streaming Stuff \n", CStreaming::MemoryCardLoad); LoadSaveDataBlock(); ReadDataFromBlock("Loading PedType Stuff \n", CPedType::Load); - DMAudio.SetMusicMasterVolume(CMenuManager::m_PrefsMusicVolume); - DMAudio.SetEffectsMasterVolume(CMenuManager::m_PrefsSfxVolume); + DMAudio.SetMusicMasterVolume(FrontEndMenuManager.m_PrefsMusicVolume); + DMAudio.SetEffectsMasterVolume(FrontEndMenuManager.m_PrefsSfxVolume); if (!CloseFile(file)) { PcSaveHelper.nErrorCode = SAVESTATUS_ERR_LOAD_CLOSE; return false; @@ -564,11 +572,6 @@ RestoreForStartLoad() ReadDataFromBufferPointer(_buf, TheCamera.GetMatrix().GetPosition().z); CStreaming::RemoveUnusedBigBuildings(CGame::currLevel); CStreaming::RemoveUnusedBuildings(CGame::currLevel); - CCollision::SortOutCollisionAfterLoad(); - CStreaming::RequestBigBuildings(CGame::currLevel); - CStreaming::LoadAllRequestedModels(false); - CStreaming::HaveAllBigBuildingsLoaded(CGame::currLevel); - CGame::TidyUpMemory(true, false); if (CloseFile(file)) { return true; |