From a3aea359b252feb83684b4b19e5fe58a5dc4e2aa Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Thu, 12 Sep 2019 13:11:13 +0300 Subject: DragCarToPoint --- src/vehicles/Automobile.cpp | 4 ++-- src/vehicles/Vehicle.cpp | 3 +-- src/vehicles/Vehicle.h | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/vehicles') diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index 2ec49710..67d80915 100644 --- a/src/vehicles/Automobile.cpp +++ b/src/vehicles/Automobile.cpp @@ -3074,7 +3074,7 @@ CAutomobile::PlaceOnRoadProperly(void) frontZ = point.point.z; m_pCurGroundEntity = entity; }else{ - frontZ = field_21C; + frontZ = m_fMapObjectHeightAhead; } CVector rear(GetPosition().x - GetForward().x*lenBack, @@ -3085,7 +3085,7 @@ CAutomobile::PlaceOnRoadProperly(void) rearZ = point.point.z; m_pCurGroundEntity = entity; }else{ - rearZ = field_220; + rearZ = m_fMapObjectHeightBehind; } float len = lenFwd + lenBack; diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index 49f21c01..8d22606a 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -90,8 +90,7 @@ CVehicle::CVehicle(uint8 CreatedBy) m_nAlarmState = 0; m_nDoorLock = CARLOCK_UNLOCKED; m_nLastWeaponDamage = -1; - field_220 = 0.0; - field_21C = field_220; + m_fMapObjectHeightAhead = m_fMapObjectHeightBehind = 0.0f; m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, this); if(m_audioEntityId) DMAudio.SetEntityStatus(m_audioEntityId, true); diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h index 96f57e06..0a86d4e5 100644 --- a/src/vehicles/Vehicle.h +++ b/src/vehicles/Vehicle.h @@ -186,8 +186,8 @@ public: int16 field_214; int16 m_nBombTimer; // goes down with each frame CEntity *m_pBlowUpEntity; - float field_21C; // front Z? - float field_220; // rear Z? + float m_fMapObjectHeightAhead; // front Z? + float m_fMapObjectHeightBehind; // rear Z? eCarLock m_nDoorLock; int8 m_nLastWeaponDamage; // see eWeaponType, -1 if no damage int8 m_nRadioStation; -- cgit v1.2.3 From 57f24ad5336594c3355c83c2571ea373f6167a62 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sat, 14 Sep 2019 20:53:04 +0300 Subject: more CCarCtrl --- src/vehicles/Vehicle.cpp | 2 +- src/vehicles/Vehicle.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vehicles') diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index 8d22606a..8abba646 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -78,7 +78,7 @@ CVehicle::CVehicle(uint8 CreatedBy) m_veh_flagD1 = false; m_veh_flagD2 = false; m_nGunFiringTime = 0; - field_214 = 0; + m_nTimeBlocked = 0; bLightsOn = false; bVehicleColProcessed = false; m_numPedsUseItAsCover = 0; diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h index 0a86d4e5..4c4f1767 100644 --- a/src/vehicles/Vehicle.h +++ b/src/vehicles/Vehicle.h @@ -183,7 +183,7 @@ public: float m_fChangeGearTime; uint32 m_nGunFiringTime; // last time when gun on vehicle was fired (used on boats) uint32 m_nTimeOfDeath; - int16 field_214; + uint16 m_nTimeBlocked; int16 m_nBombTimer; // goes down with each frame CEntity *m_pBlowUpEntity; float m_fMapObjectHeightAhead; // front Z? -- cgit v1.2.3