diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-11-30 00:15:03 +0100 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-11-30 00:15:03 +0100 |
commit | 8f05ccd6c4608172ae4c9a589d2b2c4ce915eb2c (patch) | |
tree | 96d47ee1d5f21a833726c197990683663b340e55 /src/vehicles/Cranes.cpp | |
parent | Merge pull request #841 from aap/master (diff) | |
download | re3-8f05ccd6c4608172ae4c9a589d2b2c4ce915eb2c.tar re3-8f05ccd6c4608172ae4c9a589d2b2c4ce915eb2c.tar.gz re3-8f05ccd6c4608172ae4c9a589d2b2c4ce915eb2c.tar.bz2 re3-8f05ccd6c4608172ae4c9a589d2b2c4ce915eb2c.tar.lz re3-8f05ccd6c4608172ae4c9a589d2b2c4ce915eb2c.tar.xz re3-8f05ccd6c4608172ae4c9a589d2b2c4ce915eb2c.tar.zst re3-8f05ccd6c4608172ae4c9a589d2b2c4ce915eb2c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/vehicles/Cranes.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vehicles/Cranes.cpp b/src/vehicles/Cranes.cpp index 757974a6..564f493d 100644 --- a/src/vehicles/Cranes.cpp +++ b/src/vehicles/Cranes.cpp @@ -639,11 +639,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); |