From fc72ff24d0ca7c8dd011977930b90f7f4afed51f Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sun, 20 Dec 2020 17:07:58 +0300 Subject: implemented collectives in script --- src/control/Script.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/control/Script.cpp') diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 67d2e618..6aa48d81 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -58,7 +58,7 @@ int32 CTheScripts::StoreVehicleIndex; bool CTheScripts::StoreVehicleWasRandom; CRunningScript *CTheScripts::pIdleScripts; CRunningScript *CTheScripts::pActiveScripts; -uint32 CTheScripts::NextFreeCollectiveIndex; +int32 CTheScripts::NextFreeCollectiveIndex; int32 CTheScripts::LastRandomPedId; uint16 CTheScripts::NumberOfUsedObjects; bool CTheScripts::bAlreadyRunningAMissionScript; @@ -1810,8 +1810,8 @@ void CTheScripts::Init() OnAMissionForContactFlag[i] = 0; } for (int i = 0; i < MAX_NUM_COLLECTIVES; i++){ - CollectiveArray[i].index = -1; - CollectiveArray[i].unk_data = 0; + CollectiveArray[i].colIndex = -1; + CollectiveArray[i].pedIndex = 0; } NextFreeCollectiveIndex = 0; LastRandomPedId = -1; -- cgit v1.2.3 From 2f05c64470a2b04439a07646662ac6afb57901f5 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Fri, 1 Jan 2021 13:35:23 +0300 Subject: actual struct name --- src/control/Script.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/control/Script.cpp') diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 6aa48d81..9856a8aa 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -1340,7 +1340,7 @@ void CMissionCleanup::Init() } } -CMissionCleanupEntity* CMissionCleanup::FindFree() +cleanup_entity_struct* CMissionCleanup::FindFree() { for (int i = 0; i < MAX_CLEANUP; i++){ if (m_sEntities[i].type == CLEANUP_UNUSED) @@ -1352,7 +1352,7 @@ CMissionCleanupEntity* CMissionCleanup::FindFree() void CMissionCleanup::AddEntityToList(int32 id, uint8 type) { - CMissionCleanupEntity* pNew = FindFree(); + cleanup_entity_struct* pNew = FindFree(); if (!pNew) return; pNew->id = id; -- cgit v1.2.3