summaryrefslogtreecommitdiffstats
path: root/src/core/re3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/re3.cpp')
-rw-r--r--src/core/re3.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index c2787bc3..35b3cfa4 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -150,6 +150,18 @@ FixCar(void)
((CAutomobile*)veh)->Fix();
}
+static int engineStatus;
+static void
+SetEngineStatus(void)
+{
+ CVehicle *veh = FindPlayerVehicle();
+ if(veh == nil)
+ return;
+ if(!veh->IsCar())
+ return;
+ ((CAutomobile*)veh)->Damage.SetEngineStatus(engineStatus);
+}
+
static void
ToggleComedy(void)
{
@@ -300,7 +312,8 @@ DebugMenuPopulate(void)
DebugMenuAddCmd("Spawn", "Spawn Rhino", [](){ SpawnCar(MI_RHINO); });
DebugMenuAddCmd("Spawn", "Spawn Firetruck", [](){ SpawnCar(MI_FIRETRUCK); });
-
+ DebugMenuAddVar("Debug", "Engine Status", &engineStatus, nil, 1, 0, 226, nil);
+ DebugMenuAddCmd("Debug", "Set Engine Status", SetEngineStatus);
DebugMenuAddCmd("Debug", "Fix Car", FixCar);
DebugMenuAddCmd("Debug", "Toggle Comedy Controls", ToggleComedy);
DebugMenuAddCmd("Debug", "Place Car on Road", PlaceOnRoad);