summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Cranes.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-12-06 19:28:40 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-12-06 19:28:40 +0100
commit406f64694990ca84622205538a72e080499b4464 (patch)
treee54e7a35d7ed03b49e52430286c317ae0e88983f /src/vehicles/Cranes.cpp
parentquick fix (diff)
downloadre3-406f64694990ca84622205538a72e080499b4464.tar
re3-406f64694990ca84622205538a72e080499b4464.tar.gz
re3-406f64694990ca84622205538a72e080499b4464.tar.bz2
re3-406f64694990ca84622205538a72e080499b4464.tar.lz
re3-406f64694990ca84622205538a72e080499b4464.tar.xz
re3-406f64694990ca84622205538a72e080499b4464.tar.zst
re3-406f64694990ca84622205538a72e080499b4464.zip
Diffstat (limited to '')
-rw-r--r--src/vehicles/Cranes.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vehicles/Cranes.cpp b/src/vehicles/Cranes.cpp
index 2a571a67..8433a0ba 100644
--- a/src/vehicles/Cranes.cpp
+++ b/src/vehicles/Cranes.cpp
@@ -629,11 +629,11 @@ void CCranes::Save(uint8* buf, uint32* size)
for (int i = 0; i < NUM_CRANES; i++) {
CCrane *pCrane = WriteSaveBuf(buf, aCranes[i]);
if (pCrane->m_pCraneEntity != nil)
- pCrane->m_pCraneEntity = (CBuilding*)(CPools::GetBuildingPool()->GetJustIndex(pCrane->m_pCraneEntity) + 1);
+ pCrane->m_pCraneEntity = (CBuilding*)(CPools::GetBuildingPool()->GetJustIndex_NoFreeAssert(pCrane->m_pCraneEntity) + 1);
if (pCrane->m_pHook != nil)
- pCrane->m_pHook = (CObject*)(CPools::GetObjectPool()->GetJustIndex(pCrane->m_pHook) + 1);
+ pCrane->m_pHook = (CObject*)(CPools::GetObjectPool()->GetJustIndex_NoFreeAssert(pCrane->m_pHook) + 1);
if (pCrane->m_pVehiclePickedUp != nil)
- pCrane->m_pVehiclePickedUp = (CVehicle*)(CPools::GetVehiclePool()->GetJustIndex(pCrane->m_pVehiclePickedUp) + 1);
+ pCrane->m_pVehiclePickedUp = (CVehicle*)(CPools::GetVehiclePool()->GetJustIndex_NoFreeAssert(pCrane->m_pVehiclePickedUp) + 1);
}
VALIDATESAVEBUF(*size);