summaryrefslogtreecommitdiffstats
path: root/src/control/Script4.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/control/Script4.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 '')
-rw-r--r--src/control/Script4.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/control/Script4.cpp b/src/control/Script4.cpp
index 40f9f2f1..740a8e2e 100644
--- a/src/control/Script4.cpp
+++ b/src/control/Script4.cpp
@@ -1817,8 +1817,13 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
if (model == -1)
return 0;
CVehicle* car;
- if (!CModelInfo::IsBikeModel(model))
- car = new CAutomobile(model, RANDOM_VEHICLE);
+ if(!CModelInfo::IsBikeModel(model)) car = new CAutomobile(model, RANDOM_VEHICLE);
+#ifdef FIX_BUGS
+ else {
+ debug("This shouldn't happen");
+ return 0;
+ }
+#endif
CVector pos = *(CVector*)&ScriptParams[0];
pos.z += car->GetDistanceFromCentreOfMassToBaseOfModel();
car->SetPosition(pos);