summaryrefslogtreecommitdiffstats
path: root/src/vehicles
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-10 19:42:04 +0200
committerGitHub <noreply@github.com>2020-05-10 19:42:04 +0200
commit05021ed1e1e5374b38f9ce2912c310c04d358f6d (patch)
treeb9d849f3fc61246f0038e5bec53ef8f61b040b83 /src/vehicles
parentsome fixes and cosmetic changes (diff)
parentMerge remote-tracking branch 'upstream/master' (diff)
downloadre3-05021ed1e1e5374b38f9ce2912c310c04d358f6d.tar
re3-05021ed1e1e5374b38f9ce2912c310c04d358f6d.tar.gz
re3-05021ed1e1e5374b38f9ce2912c310c04d358f6d.tar.bz2
re3-05021ed1e1e5374b38f9ce2912c310c04d358f6d.tar.lz
re3-05021ed1e1e5374b38f9ce2912c310c04d358f6d.tar.xz
re3-05021ed1e1e5374b38f9ce2912c310c04d358f6d.tar.zst
re3-05021ed1e1e5374b38f9ce2912c310c04d358f6d.zip
Diffstat (limited to 'src/vehicles')
-rw-r--r--src/vehicles/Automobile.h2
-rw-r--r--src/vehicles/Boat.h2
-rw-r--r--src/vehicles/Cranes.h2
-rw-r--r--src/vehicles/Heli.h4
-rw-r--r--src/vehicles/Plane.h3
-rw-r--r--src/vehicles/Train.h3
-rw-r--r--src/vehicles/Vehicle.h5
7 files changed, 11 insertions, 10 deletions
diff --git a/src/vehicles/Automobile.h b/src/vehicles/Automobile.h
index 041302bf..a3e8ac17 100644
--- a/src/vehicles/Automobile.h
+++ b/src/vehicles/Automobile.h
@@ -197,7 +197,7 @@ public:
static void SetAllTaxiLights(bool set);
};
-static_assert(sizeof(CAutomobile) == 0x5A8, "CAutomobile: error");
+VALIDATE_SIZE(CAutomobile, 0x5A8);
inline uint8 GetCarDoorFlag(int32 carnode) {
switch (carnode) {
diff --git a/src/vehicles/Boat.h b/src/vehicles/Boat.h
index 70407ab9..3cc3513d 100644
--- a/src/vehicles/Boat.h
+++ b/src/vehicles/Boat.h
@@ -72,7 +72,7 @@ public:
};
-static_assert(sizeof(CBoat) == 0x484, "CBoat: error");
+VALIDATE_SIZE(CBoat, 0x484);
extern float MAX_WAKE_LENGTH;
extern float MIN_WAKE_INTERVAL;
diff --git a/src/vehicles/Cranes.h b/src/vehicles/Cranes.h
index c0502638..6d877d82 100644
--- a/src/vehicles/Cranes.h
+++ b/src/vehicles/Cranes.h
@@ -72,7 +72,7 @@ public:
float GetHeightToDropoffHeight() { return m_fDropoffHeight + (m_bIsCrusher ? 7.0f : 2.0f); }
};
-static_assert(sizeof(CCrane) == 128, "CCrane: error");
+VALIDATE_SIZE(CCrane, 128);
class CCranes
{
diff --git a/src/vehicles/Heli.h b/src/vehicles/Heli.h
index 39e4cbcf..cf3f791f 100644
--- a/src/vehicles/Heli.h
+++ b/src/vehicles/Heli.h
@@ -95,4 +95,6 @@ public:
static void ActivateHeli(bool activate);
};
-static_assert(sizeof(CHeli) == 0x33C, "CHeli: error");
+
+VALIDATE_SIZE(CHeli, 0x33C);
+
diff --git a/src/vehicles/Plane.h b/src/vehicles/Plane.h
index 79738858..7e822d64 100644
--- a/src/vehicles/Plane.h
+++ b/src/vehicles/Plane.h
@@ -63,7 +63,8 @@ public:
static bool HasCesnaBeenDestroyed(void);
static bool HasDropOffCesnaBeenShotDown(void);
};
-static_assert(sizeof(CPlane) == 0x29C, "CPlane: error");
+
+VALIDATE_SIZE(CPlane, 0x29C);
extern float LandingPoint;
extern float TakeOffPoint;
diff --git a/src/vehicles/Train.h b/src/vehicles/Train.h
index bf541250..6aa76fa8 100644
--- a/src/vehicles/Train.h
+++ b/src/vehicles/Train.h
@@ -91,4 +91,5 @@ public:
float *totalLength, float *totalDuration, CTrainInterpolationLine *interpLines, bool rightRail);
static void UpdateTrains(void);
};
-static_assert(sizeof(CTrain) == 0x2E4, "CTrain: error");
+
+VALIDATE_SIZE(CTrain, 0x2E4);
diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h
index 110ff97c..f7205c7d 100644
--- a/src/vehicles/Vehicle.h
+++ b/src/vehicles/Vehicle.h
@@ -291,9 +291,6 @@ public:
static bool m_bDisableMouseSteering;
};
-static_assert(sizeof(CVehicle) == 0x288, "CVehicle: error");
-static_assert(offsetof(CVehicle, m_pCurGroundEntity) == 0x1E0, "CVehicle: error");
-static_assert(offsetof(CVehicle, m_nAlarmState) == 0x1A0, "CVehicle: error");
-static_assert(offsetof(CVehicle, m_nLastWeaponDamage) == 0x228, "CVehicle: error");
+VALIDATE_SIZE(CVehicle, 0x288);
void DestroyVehicleAndDriverAndPassengers(CVehicle* pVehicle);