summaryrefslogtreecommitdiffstats
path: root/src/vehicles/CarGen.cpp
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2021-01-31 20:44:39 +0100
committerFilip Gawin <filip.gawin@zoho.com>2021-01-31 20:44:39 +0100
commit7a3b80a9b7f414967fe59f89ab0fe5416735babe (patch)
treea84fb5e1dbdb00959d6916594d43b9c82c9bef23 /src/vehicles/CarGen.cpp
parentfix realloc (diff)
downloadre3-7a3b80a9b7f414967fe59f89ab0fe5416735babe.tar
re3-7a3b80a9b7f414967fe59f89ab0fe5416735babe.tar.gz
re3-7a3b80a9b7f414967fe59f89ab0fe5416735babe.tar.bz2
re3-7a3b80a9b7f414967fe59f89ab0fe5416735babe.tar.lz
re3-7a3b80a9b7f414967fe59f89ab0fe5416735babe.tar.xz
re3-7a3b80a9b7f414967fe59f89ab0fe5416735babe.tar.zst
re3-7a3b80a9b7f414967fe59f89ab0fe5416735babe.zip
Diffstat (limited to 'src/vehicles/CarGen.cpp')
-rw-r--r--src/vehicles/CarGen.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/vehicles/CarGen.cpp b/src/vehicles/CarGen.cpp
index 7524444b..9a0e5847 100644
--- a/src/vehicles/CarGen.cpp
+++ b/src/vehicles/CarGen.cpp
@@ -100,7 +100,12 @@ void CCarGenerator::DoInternalProcessing()
// So game crashes if it's bike :D
if (((CVehicleModelInfo*)CModelInfo::GetModelInfo(m_nModelIndex))->m_vehicleType != VEHICLE_TYPE_BIKE)
pCar = new CAutomobile(m_nModelIndex, PARKED_VEHICLE);
-
+#ifdef FIX_BUGS
+ else {
+ debug("This shouldn't happen");
+ return;
+ }
+#endif
pCar->SetIsStatic(false);
pCar->bEngineOn = false;
pos.z += pCar->GetDistanceFromCentreOfMassToBaseOfModel();