summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-10-17 19:45:07 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-10-17 19:45:07 +0200
commit720abca8269dfeb725c58d016eb88f2c124170b9 (patch)
tree8a8d7edf553c0f920ced15645a675225137cf7bd /src/core
parentMerge remote-tracking branch 'upstream/miami' into miami (diff)
downloadre3-720abca8269dfeb725c58d016eb88f2c124170b9.tar
re3-720abca8269dfeb725c58d016eb88f2c124170b9.tar.gz
re3-720abca8269dfeb725c58d016eb88f2c124170b9.tar.bz2
re3-720abca8269dfeb725c58d016eb88f2c124170b9.tar.lz
re3-720abca8269dfeb725c58d016eb88f2c124170b9.tar.xz
re3-720abca8269dfeb725c58d016eb88f2c124170b9.tar.zst
re3-720abca8269dfeb725c58d016eb88f2c124170b9.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Pools.cpp7
-rw-r--r--src/core/Radar.cpp4
-rw-r--r--src/core/Radar.h2
3 files changed, 7 insertions, 6 deletions
diff --git a/src/core/Pools.cpp b/src/core/Pools.cpp
index e0c45982..774f406d 100644
--- a/src/core/Pools.cpp
+++ b/src/core/Pools.cpp
@@ -345,8 +345,9 @@ INITSAVEBUF
++nObjects;
}
*size = nObjects * (sizeof(int16) + sizeof(int) + sizeof(CCompressedMatrix) +
- sizeof(float) + sizeof(CCompressedMatrix) + sizeof(int8) + 7 * sizeof(bool) + sizeof(float) +
- sizeof(int8) + sizeof(int8) + sizeof(uint32) + 2 * sizeof(uint32)) + sizeof(int);
+ sizeof(float) + sizeof(CCompressedMatrix) + sizeof(int8) + 7 * sizeof(bool) + sizeof(int16) +
+ + sizeof(int8) * 2 + sizeof(float) + sizeof(int8) + sizeof(int8) +
+ sizeof(uint32) + 2 * sizeof(uint32)) + sizeof(int);
CopyToBuf(buf, nObjects);
for (int i = 0; i < nPoolSize; i++) {
CObject* pObject = GetObjectPool()->GetSlot(i);
@@ -370,7 +371,6 @@ INITSAVEBUF
tmp.CompressFromFullMatrix(pObject->m_objectMatrix);
CopyToBuf(buf, tmp);
CopyToBuf(buf, pObject->ObjectCreatedBy);
- SkipSaveBuf(buf, 1);
CopyToBuf(buf, bIsPickup);
CopyToBuf(buf, bPickupObjWithMessage);
CopyToBuf(buf, bOutOfStock);
@@ -380,6 +380,7 @@ INITSAVEBUF
CopyToBuf(buf, bUseVehicleColours);
CopyToBuf(buf, pObject->m_unk);
CopyToBuf(buf, pObject->m_nBonusValue);
+ SkipSaveBuf(buf, 1);
CopyToBuf(buf, pObject->m_fCollisionDamageMultiplier);
CopyToBuf(buf, pObject->m_nCollisionDamageEffect);
CopyToBuf(buf, pObject->m_nSpecialCollisionResponseCases);
diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp
index 78166252..3ddf8337 100644
--- a/src/core/Radar.cpp
+++ b/src/core/Radar.cpp
@@ -924,6 +924,7 @@ INITSAVEBUF
for (int i = 0; i < NUMRADARBLIPS; i++) {
ms_RadarTrace[i].m_nColor = ReadSaveBuf<uint32>(buf);
+ ms_RadarTrace[i].m_Radius = ReadSaveBuf<float>(buf);
ms_RadarTrace[i].m_eBlipType = ReadSaveBuf<uint32>(buf);
ms_RadarTrace[i].m_nEntityHandle = ReadSaveBuf<int32>(buf);
ms_RadarTrace[i].m_vec2DPos.x = ReadSaveBuf<float>(buf); // CVector2D
@@ -934,7 +935,6 @@ INITSAVEBUF
ms_RadarTrace[i].m_bInUse = ReadSaveBuf<bool>(buf);
ms_RadarTrace[i].m_bShortRange = ReadSaveBuf<bool>(buf);
ms_RadarTrace[i].m_unused = ReadSaveBuf<bool>(buf);
- ms_RadarTrace[i].m_Radius = ReadSaveBuf<float>(buf);
ms_RadarTrace[i].m_wScale = ReadSaveBuf<int16>(buf);
ms_RadarTrace[i].m_eBlipDisplay = ReadSaveBuf<uint16>(buf);
ms_RadarTrace[i].m_eRadarSprite = ReadSaveBuf<uint16>(buf);
@@ -961,6 +961,7 @@ INITSAVEBUF
sRadarTraceSave *saveStruct = (sRadarTraceSave*) buf;
saveStruct->m_nColor = ms_RadarTrace[i].m_nColor;
+ saveStruct->m_Radius = ms_RadarTrace[i].m_Radius;
saveStruct->m_eBlipType = ms_RadarTrace[i].m_eBlipType;
saveStruct->m_nEntityHandle = ms_RadarTrace[i].m_nEntityHandle;
saveStruct->m_vec2DPos = ms_RadarTrace[i].m_vec2DPos;
@@ -970,7 +971,6 @@ INITSAVEBUF
saveStruct->m_bInUse = ms_RadarTrace[i].m_bInUse;
saveStruct->m_bShortRange = ms_RadarTrace[i].m_bShortRange;
saveStruct->m_unused = ms_RadarTrace[i].m_unused;
- saveStruct->m_Radius = ms_RadarTrace[i].m_Radius;
saveStruct->m_wScale = ms_RadarTrace[i].m_wScale;
saveStruct->m_eBlipDisplay = ms_RadarTrace[i].m_eBlipDisplay;
saveStruct->m_eRadarSprite = ms_RadarTrace[i].m_eRadarSprite;
diff --git a/src/core/Radar.h b/src/core/Radar.h
index b5f34f1f..8f2e7069 100644
--- a/src/core/Radar.h
+++ b/src/core/Radar.h
@@ -137,6 +137,7 @@ struct sRadarTrace
struct sRadarTraceSave
{
uint32 m_nColor;
+ float m_Radius;
uint32 m_eBlipType; // eBlipType
int32 m_nEntityHandle;
CVector2D m_vec2DPos;
@@ -146,7 +147,6 @@ struct sRadarTraceSave
bool m_bInUse;
bool m_bShortRange;
bool m_unused;
- float m_Radius;
int16 m_wScale;
uint16 m_eBlipDisplay; // eBlipDisplay
uint16 m_eRadarSprite; // eRadarSprite