summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Vehicle.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-04-30 20:41:20 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-04-30 20:41:20 +0200
commitdc12718fc20b2e70fa27653b19dd57f7d141d606 (patch)
tree80667ad887360af7a6ed8d9500e2952d57c61bc0 /src/vehicles/Vehicle.cpp
parentMerge remote-tracking branch 'upstream/master' (diff)
parentRename m_phy_flagA80 to bSkipLineCol (diff)
downloadre3-dc12718fc20b2e70fa27653b19dd57f7d141d606.tar
re3-dc12718fc20b2e70fa27653b19dd57f7d141d606.tar.gz
re3-dc12718fc20b2e70fa27653b19dd57f7d141d606.tar.bz2
re3-dc12718fc20b2e70fa27653b19dd57f7d141d606.tar.lz
re3-dc12718fc20b2e70fa27653b19dd57f7d141d606.tar.xz
re3-dc12718fc20b2e70fa27653b19dd57f7d141d606.tar.zst
re3-dc12718fc20b2e70fa27653b19dd57f7d141d606.zip
Diffstat (limited to 'src/vehicles/Vehicle.cpp')
-rw-r--r--src/vehicles/Vehicle.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index d0ccd31b..590e68f2 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -393,7 +393,7 @@ CVehicle::FlyingControl(eFlightModel flightModel)
m_vecMoveSpeed.x *= rmX;
m_vecMoveSpeed.y *= rmY;
m_vecMoveSpeed.z *= rmZ;
- if (m_status != STATUS_PLAYER && m_status != STATUS_PLAYER_REMOTE)
+ if (GetStatus() != STATUS_PLAYER && GetStatus() != STATUS_PLAYER_REMOTE)
return;
float fThrust;
if (bCheat5)
@@ -623,13 +623,13 @@ CVehicle::InflictDamage(CEntity* damagedBy, eWeaponType weaponType, float damage
}
if (m_fHealth > 0.0f) {
if (VehicleCreatedBy == RANDOM_VEHICLE && pDriver &&
- (m_status == STATUS_SIMPLE || m_status == STATUS_PHYSICS) &&
+ (GetStatus() == STATUS_SIMPLE || GetStatus() == STATUS_PHYSICS) &&
AutoPilot.m_nCarMission == MISSION_CRUISE) {
if (m_randomSeed < DAMAGE_FLEE_IN_CAR_PROBABILITY_VALUE) {
CCarCtrl::SwitchVehicleToRealPhysics(this);
AutoPilot.m_nDrivingStyle = DRIVINGSTYLE_AVOID_CARS;
AutoPilot.m_nCruiseSpeed = GAME_SPEED_TO_CARAI_SPEED * pHandling->Transmission.fUnkMaxVelocity;
- m_status = STATUS_PHYSICS;
+ SetStatus(STATUS_PHYSICS);
}
}
m_nLastWeaponDamage = weaponType;
@@ -639,11 +639,11 @@ CVehicle::InflictDamage(CEntity* damagedBy, eWeaponType weaponType, float damage
if (VehicleCreatedBy == RANDOM_VEHICLE &&
(m_fHealth < DAMAGE_HEALTH_TO_FLEE_ALWAYS ||
bFrightensDriver && m_randomSeed > DAMAGE_FLEE_ON_FOOT_PROBABILITY_VALUE)) {
- switch (m_status) {
+ switch (GetStatus()) {
case STATUS_SIMPLE:
case STATUS_PHYSICS:
if (pDriver) {
- m_status = STATUS_ABANDONED;
+ SetStatus(STATUS_ABANDONED);
pDriver->bFleeAfterExitingCar = true;
pDriver->SetObjective(OBJECTIVE_LEAVE_VEHICLE, this);
}
@@ -871,7 +871,7 @@ CVehicle::UsesSiren(uint32 id)
bool
CVehicle::IsVehicleNormal(void)
{
- if (!pDriver || m_nNumPassengers != 0 || m_status == STATUS_WRECKED)
+ if (!pDriver || m_nNumPassengers != 0 || GetStatus() == STATUS_WRECKED)
return false;
switch (GetModelIndex()){
case MI_FIRETRUCK:
@@ -1141,7 +1141,7 @@ CVehicle::AddPassenger(CPed *passenger, uint8 n)
void
CVehicle::RemoveDriver(void)
{
- m_status = STATUS_ABANDONED;
+ SetStatus(STATUS_ABANDONED);
pDriver = nil;
}