diff options
author | aap <aap@papnet.eu> | 2020-12-01 11:25:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-01 11:25:02 +0100 |
commit | 56c471d02e1c704202f809de7f3d179c98ae121f (patch) | |
tree | a1886f8b54f498c02c9ffecb9f1541f65ecedfae /src/vehicles | |
parent | d6fab1bc53627d55391d10a557a9e0cbcd11ac6d (diff) | |
parent | a3b83a5d2fe7b614b8b3693305535112f68912bb (diff) |
Merge pull request #854 from Nick007J/master
small garages + templates revision
Diffstat (limited to 'src/vehicles')
-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); |