From 5edd9e75da54534fe48c779d4f6c6cd17535be10 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sun, 1 Nov 2020 18:21:05 +0300 Subject: finished script and replay --- src/control/Script.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/control/Script.cpp') diff --git a/src/control/Script.cpp b/src/control/Script.cpp index f85fc076..7c6082c8 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -88,6 +88,8 @@ #include #endif +//--MIAMI: file done + #define PICKUP_PLACEMENT_OFFSET 0.5f #define PED_FIND_Z_OFFSET 5.0f #define COP_PED_FIND_Z_OFFSET 10.0f @@ -15751,7 +15753,7 @@ INITSAVEBUF uint32 script_data_size = SCRIPT_DATA_SIZE; WriteSaveBuf(buf, script_data_size); WriteSaveBuf(buf, OnAMissionFlag); - WriteSaveBuf(buf, NextFreeCollectiveIndex); + WriteSaveBuf(buf, LastMissionPassedTime); for (uint32 i = 0; i < MAX_NUM_BUILDING_SWAPS; i++) { CBuilding* pBuilding = BuildingSwapArray[i].m_pBuilding; uint32 type, handle; @@ -15801,12 +15803,12 @@ INITSAVEBUF WriteSaveBuf(buf, handle); } WriteSaveBuf(buf, bUsingAMultiScriptFile); - WriteSaveBuf(buf, (uint8)0); + WriteSaveBuf(buf, bPlayerHasMetDebbieHarry); WriteSaveBuf(buf, (uint16)0); WriteSaveBuf(buf, MainScriptSize); WriteSaveBuf(buf, LargestMissionScriptSize); WriteSaveBuf(buf, NumberOfMissionScripts); - WriteSaveBuf(buf, (uint16)0); + WriteSaveBuf(buf, NumberOfExclusiveMissionScripts); WriteSaveBuf(buf, runningScripts); for (CRunningScript* pScript = pActiveScripts; pScript; pScript = pScript->GetNext()) pScript->Save(buf); @@ -15823,7 +15825,7 @@ INITSAVEBUF ScriptSpace[i] = ReadSaveBuf(buf); script_assert(ReadSaveBuf(buf) == SCRIPT_DATA_SIZE); OnAMissionFlag = ReadSaveBuf(buf); - NextFreeCollectiveIndex = ReadSaveBuf(buf); + LastMissionPassedTime = ReadSaveBuf(buf); for (uint32 i = 0; i < MAX_NUM_BUILDING_SWAPS; i++) { uint32 type = ReadSaveBuf(buf); uint32 handle = ReadSaveBuf(buf); @@ -15871,12 +15873,12 @@ INITSAVEBUF InvisibilitySettingArray[i]->bIsVisible = false; } script_assert(ReadSaveBuf(buf) == bUsingAMultiScriptFile); - ReadSaveBuf(buf); + bPlayerHasMetDebbieHarry = ReadSaveBuf(buf); ReadSaveBuf(buf); script_assert(ReadSaveBuf(buf) == MainScriptSize); script_assert(ReadSaveBuf(buf) == LargestMissionScriptSize); script_assert(ReadSaveBuf(buf) == NumberOfMissionScripts); - ReadSaveBuf(buf); + script_assert(ReadSaveBuf(buf) == NumberOfExclusiveMissionScripts); uint32 runningScripts = ReadSaveBuf(buf); for (uint32 i = 0; i < runningScripts; i++) StartNewScript(0)->Load(buf); @@ -16103,7 +16105,7 @@ void CTheScripts::CleanUpThisObject(CObject* pObject) if (pObject->ObjectCreatedBy != MISSION_OBJECT) return; pObject->ObjectCreatedBy = TEMP_OBJECT; - pObject->m_nEndOfLifeTime = CTimer::GetTimeInMilliseconds() + 20000; + pObject->m_nEndOfLifeTime = CTimer::GetTimeInMilliseconds() + 20000000; pObject->m_nRefModelIndex = -1; pObject->bUseVehicleColours = false; ++CObject::nNoTempObjects; -- cgit v1.2.3