summaryrefslogtreecommitdiffstats
path: root/src/vehicles
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2021-08-04 13:54:04 +0200
committeraap <aap@papnet.eu>2021-08-04 13:54:04 +0200
commit4f461bd7bee01bdfdbbdef2d999fd44fa7198415 (patch)
treefaafcabaeb889161b6ff5f5d1cb8a0766932a1b9 /src/vehicles
parentCPhysical fixes and cleanup (diff)
downloadre3-4f461bd7bee01bdfdbbdef2d999fd44fa7198415.tar
re3-4f461bd7bee01bdfdbbdef2d999fd44fa7198415.tar.gz
re3-4f461bd7bee01bdfdbbdef2d999fd44fa7198415.tar.bz2
re3-4f461bd7bee01bdfdbbdef2d999fd44fa7198415.tar.lz
re3-4f461bd7bee01bdfdbbdef2d999fd44fa7198415.tar.xz
re3-4f461bd7bee01bdfdbbdef2d999fd44fa7198415.tar.zst
re3-4f461bd7bee01bdfdbbdef2d999fd44fa7198415.zip
Diffstat (limited to 'src/vehicles')
-rw-r--r--src/vehicles/Vehicle.cpp16
-rw-r--r--src/vehicles/Vehicle.h5
2 files changed, 10 insertions, 11 deletions
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index 4259f9d8..451f3a39 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -527,7 +527,8 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon
#ifdef FIX_BUGS
// contactSpeedFwd is independent of framerate but fwd has timestep as a factor
// so we probably have to fix this
- fwd *= CTimer::GetTimeStepFix();
+ // better get rid of it here too
+ //fwd *= CTimer::GetTimeStepFix();
#endif
if(!bBraking){
@@ -860,12 +861,11 @@ CVehicle::ProcessDelayedExplosion(void)
if(IsCar() && ((CAutomobile*)this)->m_bombType == CARBOMB_TIMEDACTIVE && (m_nBombTimer & 0xFE00) != (prev & 0xFE00))
DMAudio.PlayOneShot(m_audioEntityId, SOUND_CAR_BOMB_TICK, 0.0f);
- if (m_nBombTimer != 0)
- return;
-
- if(FindPlayerVehicle() != this && m_pBlowUpEntity == FindPlayerPed())
- CWorld::Players[CWorld::PlayerInFocus].AwardMoneyForExplosion(this);
- BlowUpCar(m_pBlowUpEntity);
+ if (m_nBombTimer == 0){
+ if(FindPlayerVehicle() != this && m_pBlowUpEntity == FindPlayerPed())
+ CWorld::Players[CWorld::PlayerInFocus].AwardMoneyForExplosion(this);
+ BlowUpCar(m_pBlowUpEntity);
+ }
}
bool
@@ -1207,7 +1207,7 @@ CVehicle::ProcessCarAlarm(void)
{
uint32 step;
- if(!IsAlarmOn())
+ if(m_nAlarmState == 0 || m_nAlarmState == -1)
return;
step = CTimer::GetTimeStepInMilliseconds();
diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h
index e7ad5c13..738cfc0f 100644
--- a/src/vehicles/Vehicle.h
+++ b/src/vehicles/Vehicle.h
@@ -25,8 +25,7 @@ enum eCarLock {
CARLOCK_LOCKOUT_PLAYER_ONLY,
CARLOCK_LOCKED_PLAYER_INSIDE,
CARLOCK_LOCKED_INITIALLY,
- CARLOCK_FORCE_SHUT_DOORS,
- CARLOCK_SKIP_SHUT_DOORS
+ CARLOCK_FORCE_SHUT_DOORS
};
enum eDoors
@@ -187,7 +186,7 @@ public:
uint8 m_bRainSamplesCounter;
uint8 m_nCarHornTimer;
uint8 m_nCarHornPattern; // last horn?
- bool m_bSirenOrAlarm;
+ uint8 m_bSirenOrAlarm;
int8 m_comedyControlState;
CStoredCollPoly m_aCollPolys[2]; // poly which is under front/rear part of car
float m_fSteerInput;