summaryrefslogtreecommitdiffstats
path: root/src/vehicles
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/vehicles/Automobile.cpp2
-rw-r--r--src/vehicles/Automobile.h2
-rw-r--r--src/vehicles/Boat.cpp2
-rw-r--r--src/vehicles/Boat.h2
-rw-r--r--src/vehicles/Heli.h1
-rw-r--r--src/vehicles/Plane.h1
-rw-r--r--src/vehicles/Train.h1
-rw-r--r--src/vehicles/Vehicle.cpp26
-rw-r--r--src/vehicles/Vehicle.h24
9 files changed, 12 insertions, 49 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index 602eb589..9db60da0 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -229,11 +229,9 @@ CAutomobile::ProcessControl(void)
colModel = GetColModel();
bWarnedPeds = false;
-#ifndef MIAMI
// skip if the collision isn't for the current level
if(colModel->level > LEVEL_NONE && colModel->level != CCollision::ms_collisionInMemory)
return;
-#endif
// Improve grip of vehicles in certain cases
bool strongGrip1 = false;
diff --git a/src/vehicles/Automobile.h b/src/vehicles/Automobile.h
index 0356a9f2..041302bf 100644
--- a/src/vehicles/Automobile.h
+++ b/src/vehicles/Automobile.h
@@ -197,6 +197,8 @@ public:
static void SetAllTaxiLights(bool set);
};
+static_assert(sizeof(CAutomobile) == 0x5A8, "CAutomobile: error");
+
inline uint8 GetCarDoorFlag(int32 carnode) {
switch (carnode) {
case CAR_DOOR_LF:
diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp
index ecf760e4..348f2732 100644
--- a/src/vehicles/Boat.cpp
+++ b/src/vehicles/Boat.cpp
@@ -109,10 +109,8 @@ CBoat::GetComponentWorldPosition(int32 component, CVector &pos)
void
CBoat::ProcessControl(void)
{
-#ifndef MIAMI
if(m_nZoneLevel > LEVEL_NONE && m_nZoneLevel != CCollision::ms_collisionInMemory)
return;
-#endif
bool onLand = m_fDamageImpulse > 0.0f && m_vecDamageNormal.z > 0.1f;
diff --git a/src/vehicles/Boat.h b/src/vehicles/Boat.h
index cde5de84..70407ab9 100644
--- a/src/vehicles/Boat.h
+++ b/src/vehicles/Boat.h
@@ -72,6 +72,8 @@ public:
};
+static_assert(sizeof(CBoat) == 0x484, "CBoat: error");
+
extern float MAX_WAKE_LENGTH;
extern float MIN_WAKE_INTERVAL;
extern float WAKE_LIFETIME; \ No newline at end of file
diff --git a/src/vehicles/Heli.h b/src/vehicles/Heli.h
index a8f604aa..39e4cbcf 100644
--- a/src/vehicles/Heli.h
+++ b/src/vehicles/Heli.h
@@ -95,3 +95,4 @@ public:
static void ActivateHeli(bool activate);
};
+static_assert(sizeof(CHeli) == 0x33C, "CHeli: error");
diff --git a/src/vehicles/Plane.h b/src/vehicles/Plane.h
index 6fa6776b..79738858 100644
--- a/src/vehicles/Plane.h
+++ b/src/vehicles/Plane.h
@@ -63,6 +63,7 @@ public:
static bool HasCesnaBeenDestroyed(void);
static bool HasDropOffCesnaBeenShotDown(void);
};
+static_assert(sizeof(CPlane) == 0x29C, "CPlane: error");
extern float LandingPoint;
extern float TakeOffPoint;
diff --git a/src/vehicles/Train.h b/src/vehicles/Train.h
index e20a08fd..bf541250 100644
--- a/src/vehicles/Train.h
+++ b/src/vehicles/Train.h
@@ -91,3 +91,4 @@ public:
float *totalLength, float *totalDuration, CTrainInterpolationLine *interpLines, bool rightRail);
static void UpdateTrains(void);
};
+static_assert(sizeof(CTrain) == 0x2E4, "CTrain: error");
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index 67024782..5dc7bc72 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -99,9 +99,6 @@ CVehicle::CVehicle(uint8 CreatedBy)
m_bSirenOrAlarm = 0;
m_nCarHornTimer = 0;
m_nCarHornPattern = 0;
-#ifdef MIAMI
- bParking = false;
-#endif
m_nAlarmState = 0;
m_nDoorLock = CARLOCK_UNLOCKED;
m_nLastWeaponDamage = -1;
@@ -121,9 +118,6 @@ CVehicle::CVehicle(uint8 CreatedBy)
AutoPilot.m_nTimeToStartMission = CTimer::GetTimeInMilliseconds();
AutoPilot.m_bStayInCurrentLevel = false;
AutoPilot.m_bIgnorePathfinding = false;
-#ifdef MIAMI
- AutoPilot.m_nSwitchDistance = 20;
-#endif
}
CVehicle::~CVehicle()
@@ -1353,23 +1347,3 @@ CVehicle::Load(uint8*& buf)
SkipSaveBuf(buf, 99);
}
#endif
-
-#ifdef MIAMI
-eVehicleAppearance
-//--MIAMI: TODO, implement VC version, appearance != type
-// This would work for cars, boats and bikes but not for planes and helis
-CVehicle::GetVehicleAppearance(void)
-{
- if (IsCar())
- return VEHICLE_CAR;
- if (IsBoat())
- return VEHICLE_BOAT;
- if (IsBike())
- return VEHICLE_BIKE;
- if (IsPlane())
- return VEHICLE_PLANE;
- if (IsHeli())
- return VEHICLE_HELI;
- return VEHICLE_NONE;
-}
-#endif
diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h
index bff5d578..110ff97c 100644
--- a/src/vehicles/Vehicle.h
+++ b/src/vehicles/Vehicle.h
@@ -109,18 +109,6 @@ enum eFlightModel
FLIGHT_MODEL_SEAPLANE
};
-#ifdef MIAMI
-enum eVehicleAppearance
-{
- VEHICLE_NONE,
- VEHICLE_CAR,
- VEHICLE_BIKE,
- VEHICLE_HELI,
- VEHICLE_BOAT,
- VEHICLE_PLANE,
-};
-#endif
-
// Or Weapon.h?
void FireOneInstantHitRound(CVector *shotSource, CVector *shotTarget, int32 damage);
@@ -184,10 +172,6 @@ public:
uint8 bIsCarParkVehicle : 1; // Car has been created using the special CAR_PARK script command
uint8 bHasAlreadyBeenRecorded : 1; // Used for replays
-#ifdef MIAMI
- uint8 bParking : 1;
-#endif;
-
int8 m_numPedsUseItAsCover;
uint8 m_nAmmoInClip; // Used to make the guns on boat do a reload (20 by default)
int8 m_nPacManPickupsCarried;
@@ -252,9 +236,6 @@ public:
virtual void Load(uint8*& buf);
#endif
-#ifdef MIAMI
- eVehicleAppearance GetVehicleAppearance(void);
-#endif
bool IsCar(void) { return m_vehType == VEHICLE_TYPE_CAR; }
bool IsBoat(void) { return m_vehType == VEHICLE_TYPE_BOAT; }
bool IsTrain(void) { return m_vehType == VEHICLE_TYPE_TRAIN; }
@@ -310,4 +291,9 @@ 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");
+
void DestroyVehicleAndDriverAndPassengers(CVehicle* pVehicle);