summaryrefslogtreecommitdiffstats
path: root/src/vehicles
diff options
context:
space:
mode:
Diffstat (limited to 'src/vehicles')
-rw-r--r--src/vehicles/Automobile.cpp15
-rw-r--r--src/vehicles/Automobile.h2
-rw-r--r--src/vehicles/HandlingMgr.cpp2
-rw-r--r--src/vehicles/Plane.h12
-rw-r--r--src/vehicles/Vehicle.cpp2
-rw-r--r--src/vehicles/Vehicle.h16
6 files changed, 39 insertions, 10 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index eaa16435..46116536 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -115,7 +115,7 @@ CAutomobile::CAutomobile(int32 id, uint8 CreatedBy)
field_594 = 0;
bNotDamagedUpsideDown = false;
bMoreResistantToDamage = false;
- field_514 = 0;
+ m_fVelocityChangeForAudio = 0.f;
field_4E2 = 0;
for(i = 0; i < 4; i++){
@@ -180,8 +180,6 @@ CAutomobile::CAutomobile(int32 id, uint8 CreatedBy)
bExplosionProof = true;
bBulletProof = true;
}
-
- *(void**)this = (void*)0x600C1C;
}
@@ -1443,9 +1441,11 @@ CAutomobile::RcbanditCheckHitWheels(void)
{ EAXJMP(0x53C990);
}
-//WRAPPER void
-//CAutomobile::VehicleDamage(float impulse, uint16 damagedPiece)
-//{ EAXJMP(0x52F390);
+#if 0
+WRAPPER void
+CAutomobile::VehicleDamage(float impulse, uint16 damagedPiece)
+{ EAXJMP(0x52F390); }
+#else
void
CAutomobile::VehicleDamage(float impulse, uint16 damagedPiece)
{
@@ -1494,7 +1494,7 @@ CAutomobile::VehicleDamage(float impulse, uint16 damagedPiece)
return;
if(m_pDamageEntity){
- if(m_pDamageEntity->m_status == STATUS_PLAYER_PLAYBACKFROMBUFFER &&
+ if(m_pDamageEntity->IsBuilding() &&
DotProduct(m_vecDamageNormal, GetUp()) > 0.6f)
return;
}
@@ -1686,6 +1686,7 @@ CAutomobile::VehicleDamage(float impulse, uint16 damagedPiece)
}
}
}
+#endif
void
CAutomobile::dmgDrawCarCollidingParticles(const CVector &pos, float amount)
diff --git a/src/vehicles/Automobile.h b/src/vehicles/Automobile.h
index 620c47a7..15b7ef0f 100644
--- a/src/vehicles/Automobile.h
+++ b/src/vehicles/Automobile.h
@@ -61,7 +61,7 @@ public:
float m_aSuspensionLineLength[4];
float m_fHeightAboveRoad;
float m_fTraction;
- int32 field_514;
+ float m_fVelocityChangeForAudio;
float m_randomValues[6]; // used for what?
float m_fFireBlowUpTimer;
CPhysical *m_aGroundPhysical[4]; // physicals touching wheels
diff --git a/src/vehicles/HandlingMgr.cpp b/src/vehicles/HandlingMgr.cpp
index 4d3a94a8..be96ab08 100644
--- a/src/vehicles/HandlingMgr.cpp
+++ b/src/vehicles/HandlingMgr.cpp
@@ -70,7 +70,7 @@ char VehicleNames[NUMHANDLINGS][14] = {
cHandlingDataMgr::cHandlingDataMgr(void)
{
- memset(this, 0, sizeof(this));
+ memset(this, 0, sizeof(*this));
}
void
diff --git a/src/vehicles/Plane.h b/src/vehicles/Plane.h
index 1f54e529..e263766e 100644
--- a/src/vehicles/Plane.h
+++ b/src/vehicles/Plane.h
@@ -7,7 +7,17 @@ class CPlane : public CVehicle
{
public:
// 0x288
- uint8 stuff[20];
+ int16 m_wIndex;
+ int16 field_650;
+ int16 m_wNextPathNode;
+ char field_654;
+ char field_655;
+ float field_656;
+ int m_nFrameWhenHit;
+ char m_bHasBeenHit;
+ char m_bIsIncomingCesna;
+ char m_bIsDropoffCesna;
+ char field_667;
CPlane(int, uint8);
~CPlane(void);
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index 4ac3af53..cc98bbe9 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -65,6 +65,8 @@ CVehicle::CVehicle(uint8 CreatedBy)
bIsDamaged = false;
bFadeOut = false;
m_veh_flagC10 = false;
+ m_nTimeOfDeath = 0;
+ m_pCarFire = nil;
bHasBeenOwnedByPlayer = false;
m_veh_flagC20 = false;
bCanBeDamaged = true;
diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h
index 3074bfb6..4668ba7a 100644
--- a/src/vehicles/Vehicle.h
+++ b/src/vehicles/Vehicle.h
@@ -320,3 +320,19 @@ inline uint8 GetVehDoorFlag(int32 carnode) {
return 0;
}
}
+
+class cTransmission;
+
+class cVehicleParams
+{
+public:
+ char m_bDistanceCalculated;
+ char gap_1[3];
+ float m_fDistance;
+ CVehicle *m_pVehicle;
+ cTransmission *m_pTransmission;
+ int m_nIndex;
+ float m_fVelocityChange;
+};
+
+static_assert(sizeof(cVehicleParams) == 0x18, "CVehicle: error");