summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Cranes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vehicles/Cranes.cpp')
-rw-r--r--src/vehicles/Cranes.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/vehicles/Cranes.cpp b/src/vehicles/Cranes.cpp
index 1191465a..0f1b8b4c 100644
--- a/src/vehicles/Cranes.cpp
+++ b/src/vehicles/Cranes.cpp
@@ -11,6 +11,7 @@
#include "Replay.h"
#include "Object.h"
#include "World.h"
+#include "SaveBuf.h"
#define MAX_DISTANCE_TO_FIND_CRANE (10.0f)
#define CRANE_UPDATE_RADIUS (300.0f)
@@ -85,7 +86,7 @@ void CCranes::AddThisOneCrane(CEntity* pEntity)
pCrane->m_bWasMilitaryCrane = false;
pCrane->m_nAudioEntity = DMAudio.CreateEntity(AUDIOTYPE_CRANE, &aCranes[NumCranes]);
if (pCrane->m_nAudioEntity >= 0)
- DMAudio.SetEntityStatus(pCrane->m_nAudioEntity, true);
+ DMAudio.SetEntityStatus(pCrane->m_nAudioEntity, TRUE);
pCrane->m_bIsTop = (MODELID_CRANE_1 != pEntity->GetModelIndex());
// Is this used to avoid military crane?
if (pCrane->m_bIsTop || pEntity->GetPosition().y > 0.0f) {
@@ -653,10 +654,10 @@ void CCranes::Load(uint8* buf, uint32 size)
{
INITSAVEBUF
- NumCranes = ReadSaveBuf<int32>(buf);
- CarsCollectedMilitaryCrane = ReadSaveBuf<uint32>(buf);
+ ReadSaveBuf(&NumCranes, buf);
+ ReadSaveBuf(&CarsCollectedMilitaryCrane, buf);
for (int i = 0; i < NUM_CRANES; i++)
- aCranes[i] = ReadSaveBuf<CCrane>(buf);
+ ReadSaveBuf(&aCranes[i], buf);
for (int i = 0; i < NUM_CRANES; i++) {
CCrane *pCrane = &aCranes[i];
if (pCrane->m_pCraneEntity != nil)
@@ -669,7 +670,7 @@ void CCranes::Load(uint8* buf, uint32 size)
for (int i = 0; i < NUM_CRANES; i++) {
aCranes[i].m_nAudioEntity = DMAudio.CreateEntity(AUDIOTYPE_CRANE, &aCranes[i]);
if (aCranes[i].m_nAudioEntity != 0)
- DMAudio.SetEntityStatus(aCranes[i].m_nAudioEntity, true);
+ DMAudio.SetEntityStatus(aCranes[i].m_nAudioEntity, TRUE);
}
VALIDATESAVEBUF(size);