From 35add59b3402ed7e6acf723cd592917da4139917 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sat, 12 Oct 2019 17:03:32 +0300 Subject: Removed !this check in CVehicle::IsWrecked, added CPed::IsNotInWreckedVehicle instead --- src/vehicles/Vehicle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vehicles') diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h index db0485a9..ffc2ca45 100644 --- a/src/vehicles/Vehicle.h +++ b/src/vehicles/Vehicle.h @@ -266,7 +266,7 @@ public: bool ShufflePassengersToMakeSpace(void); bool IsAlarmOn(void) { return m_nAlarmState != 0 && m_nAlarmState != -1; } - bool IsWrecked(void) { return !this || m_status == STATUS_WRECKED; } + bool IsWrecked(void) { return m_status == STATUS_WRECKED; } CVehicleModelInfo* GetModelInfo() { return (CVehicleModelInfo*)CModelInfo::GetModelInfo(GetModelIndex()); } static bool &bWheelsOnlyCheat; -- cgit v1.2.3 From be2e01c6fb0f734ad569f3ad272a3d3dfb31d3ce Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sat, 12 Oct 2019 17:06:15 +0300 Subject: Fixed wrong CAutomobile field type --- src/vehicles/Automobile.cpp | 2 +- src/vehicles/Automobile.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vehicles') diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index 2329a9d9..12c9c940 100644 --- a/src/vehicles/Automobile.cpp +++ b/src/vehicles/Automobile.cpp @@ -128,7 +128,7 @@ CAutomobile::CAutomobile(int32 id, uint8 CreatedBy) m_fGasPedal = 0.0f; m_fBrakePedal = 0.0f; m_pSetOnFireEntity = nil; - m_fGasPedalAudio = 0; + m_fGasPedalAudio = 0.0f; bNotDamagedUpsideDown = false; bMoreResistantToDamage = false; m_fVelocityChangeForAudio = 0.0f; diff --git a/src/vehicles/Automobile.h b/src/vehicles/Automobile.h index 6203957d..534f28a4 100644 --- a/src/vehicles/Automobile.h +++ b/src/vehicles/Automobile.h @@ -117,7 +117,7 @@ public: uint8 m_nWheelsOnGround; uint8 m_nDriveWheelsOnGround; uint8 m_nDriveWheelsOnGroundPrev; - int32 m_fGasPedalAudio; + float m_fGasPedalAudio; tWheelState m_aWheelState[4]; static bool &m_sAllTaxiLights; -- cgit v1.2.3