summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Vehicle.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-16 19:48:50 +0200
committeraap <aap@papnet.eu>2019-07-16 19:48:50 +0200
commit36f3a517f9664415b07a4aa537db22159b67a8f2 (patch)
tree967839bbeee586f4f74cbfd630ed9118ad9d84f2 /src/vehicles/Vehicle.cpp
parentfixed merge (diff)
downloadre3-36f3a517f9664415b07a4aa537db22159b67a8f2.tar
re3-36f3a517f9664415b07a4aa537db22159b67a8f2.tar.gz
re3-36f3a517f9664415b07a4aa537db22159b67a8f2.tar.bz2
re3-36f3a517f9664415b07a4aa537db22159b67a8f2.tar.lz
re3-36f3a517f9664415b07a4aa537db22159b67a8f2.tar.xz
re3-36f3a517f9664415b07a4aa537db22159b67a8f2.tar.zst
re3-36f3a517f9664415b07a4aa537db22159b67a8f2.zip
Diffstat (limited to 'src/vehicles/Vehicle.cpp')
-rw-r--r--src/vehicles/Vehicle.cpp36
1 files changed, 17 insertions, 19 deletions
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index 0abdffd2..2781f9f5 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -56,14 +56,14 @@ CVehicle::CVehicle(uint8 CreatedBy)
for(i = 0; i < m_nNumMaxPassengers; i++)
pPassengers[i] = nil;
m_nBombTimer = 0;
- m_pWhoSetMeOnFire = nil;
+ m_pBlowUpEntity = nil;
field_1FB = 0;
bComedyControls = false;
m_veh_flagB40 = false;
m_veh_flagB80 = false;
m_veh_flagC1 = false;
bIsDamaged = false;
- m_veh_flagC8 = false;
+ bFadeOut = false;
m_veh_flagC10 = false;
bHasBeenOwnedByPlayer = false;
m_veh_flagC20 = false;
@@ -96,11 +96,11 @@ CVehicle::CVehicle(uint8 CreatedBy)
m_comedyControlState = 0;
m_aCollPolys[0].valid = false;
m_aCollPolys[1].valid = false;
- m_autoPilot.m_nCarMission = MISSION_NONE;
- m_autoPilot.m_nAnimationId = TEMPACT_NONE;
- m_autoPilot.m_nTimeToStartMission = CTimer::GetTimeInMilliseconds();
- m_autoPilot.m_flag4 = false;
- m_autoPilot.m_flag10 = false;
+ AutoPilot.m_nCarMission = MISSION_NONE;
+ AutoPilot.m_nAnimationId = TEMPACT_NONE;
+ AutoPilot.m_nTimeToStartMission = CTimer::GetTimeInMilliseconds();
+ AutoPilot.m_flag4 = false;
+ AutoPilot.m_flag10 = false;
}
CVehicle::~CVehicle()
@@ -374,20 +374,18 @@ CVehicle::ProcessDelayedExplosion(void)
if(m_nBombTimer == 0)
return;
- if(m_nBombTimer == 0){
- int tick = CTimer::GetTimeStep()/60.0f*1000.0f;
- if(tick > m_nBombTimer)
- m_nBombTimer = 0;
- else
- m_nBombTimer -= tick;
+ int tick = CTimer::GetTimeStep()/60.0f*1000.0f;
+ if(tick > m_nBombTimer)
+ m_nBombTimer = 0;
+ else
+ m_nBombTimer -= tick;
- if(IsCar() && ((CAutomobile*)this)->m_auto_flagA7 == 4 && (m_nBombTimer & 0xFE00) != 0xFE00)
- DMAudio.PlayOneShot(m_audioEntityId, SOUND_CAR_BOMB_TICK, 0.0f);
+ if(IsCar() && ((CAutomobile*)this)->m_bombType == 4 && (m_nBombTimer & 0xFE00) != 0xFE00)
+ DMAudio.PlayOneShot(m_audioEntityId, SOUND_CAR_BOMB_TICK, 0.0f);
- if(FindPlayerVehicle() != this && m_pWhoSetMeOnFire == FindPlayerPed())
- CWorld::Players[CWorld::PlayerInFocus].AwardMoneyForExplosion(this);
- BlowUpCar(m_pWhoSetMeOnFire);
- }
+ if(FindPlayerVehicle() != this && m_pBlowUpEntity == FindPlayerPed())
+ CWorld::Players[CWorld::PlayerInFocus].AwardMoneyForExplosion(this);
+ BlowUpCar(m_pBlowUpEntity);
}
bool