diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-06-26 00:25:59 +0300 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-06-26 00:25:59 +0300 |
commit | af7573ddbe38e0aaa485877e7ccb2e704b0f5a7f (patch) | |
tree | 75a719bb1ab82b354f464562ecc1fae9c55f64d0 /src/core/Pools.cpp | |
parent | 4bab6d5356fe62c2166dbabc504792a510df7819 (diff) |
Revert "Redo ReadSaveBuf + common.h cleanup"
This reverts commit 2b67aba94cb6448fb24c869559465eddf2bad069.
Diffstat (limited to 'src/core/Pools.cpp')
-rw-r--r-- | src/core/Pools.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/core/Pools.cpp b/src/core/Pools.cpp index 5cffe9e4..39cfb1d4 100644 --- a/src/core/Pools.cpp +++ b/src/core/Pools.cpp @@ -9,7 +9,6 @@ #endif #include "Population.h" #include "ProjectileInfo.h" -#include "SaveBuf.h" #include "Streaming.h" #include "Wanted.h" #include "World.h" @@ -131,19 +130,14 @@ CPools::MakeSureSlotInObjectPoolIsEmpty(int32 slot) void CPools::LoadVehiclePool(uint8* buf, uint32 size) { INITSAVEBUF - int nNumCars, nNumBoats; - ReadSaveBuf(&nNumCars, buf); - ReadSaveBuf(&nNumBoats, buf); + int nNumCars = ReadSaveBuf<int>(buf); + int nNumBoats = ReadSaveBuf<int>(buf); for (int i = 0; i < nNumCars + nNumBoats; i++) { - uint32 type; - int16 model; - int32 slot; - - ReadSaveBuf(&type, buf); - ReadSaveBuf(&model, buf); + uint32 type = ReadSaveBuf<uint32>(buf); + int16 model = ReadSaveBuf<int16>(buf); CStreaming::RequestModel(model, STREAMFLAGS_DEPENDENCY); CStreaming::LoadAllRequestedModels(false); - ReadSaveBuf(&slot, buf); + int32 slot = ReadSaveBuf<int32>(buf); CVehicle* pVehicle; #ifdef COMPATIBLE_SAVES if (type == VEHICLE_TYPE_BOAT) |