summaryrefslogtreecommitdiffstats
path: root/src/core/Pools.cpp
diff options
context:
space:
mode:
authorwithmorten <morten.with@gmail.com>2021-06-26 19:14:46 +0200
committerwithmorten <morten.with@gmail.com>2021-06-26 19:14:46 +0200
commitf3a931e1c99372ae4bc224ef482d4052a09580cb (patch)
tree13992380234e68b8f1a32030b4df6aa3d6ebbaca /src/core/Pools.cpp
parentMerge pull request #1155 from leanndroguedes/master (diff)
downloadre3-f3a931e1c99372ae4bc224ef482d4052a09580cb.tar
re3-f3a931e1c99372ae4bc224ef482d4052a09580cb.tar.gz
re3-f3a931e1c99372ae4bc224ef482d4052a09580cb.tar.bz2
re3-f3a931e1c99372ae4bc224ef482d4052a09580cb.tar.lz
re3-f3a931e1c99372ae4bc224ef482d4052a09580cb.tar.xz
re3-f3a931e1c99372ae4bc224ef482d4052a09580cb.tar.zst
re3-f3a931e1c99372ae4bc224ef482d4052a09580cb.zip
Diffstat (limited to 'src/core/Pools.cpp')
-rw-r--r--src/core/Pools.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/core/Pools.cpp b/src/core/Pools.cpp
index 39cfb1d4..5cffe9e4 100644
--- a/src/core/Pools.cpp
+++ b/src/core/Pools.cpp
@@ -9,6 +9,7 @@
#endif
#include "Population.h"
#include "ProjectileInfo.h"
+#include "SaveBuf.h"
#include "Streaming.h"
#include "Wanted.h"
#include "World.h"
@@ -130,14 +131,19 @@ CPools::MakeSureSlotInObjectPoolIsEmpty(int32 slot)
void CPools::LoadVehiclePool(uint8* buf, uint32 size)
{
INITSAVEBUF
- int nNumCars = ReadSaveBuf<int>(buf);
- int nNumBoats = ReadSaveBuf<int>(buf);
+ int nNumCars, nNumBoats;
+ ReadSaveBuf(&nNumCars, buf);
+ ReadSaveBuf(&nNumBoats, buf);
for (int i = 0; i < nNumCars + nNumBoats; i++) {
- uint32 type = ReadSaveBuf<uint32>(buf);
- int16 model = ReadSaveBuf<int16>(buf);
+ uint32 type;
+ int16 model;
+ int32 slot;
+
+ ReadSaveBuf(&type, buf);
+ ReadSaveBuf(&model, buf);
CStreaming::RequestModel(model, STREAMFLAGS_DEPENDENCY);
CStreaming::LoadAllRequestedModels(false);
- int32 slot = ReadSaveBuf<int32>(buf);
+ ReadSaveBuf(&slot, buf);
CVehicle* pVehicle;
#ifdef COMPATIBLE_SAVES
if (type == VEHICLE_TYPE_BOAT)