diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2019-07-27 20:28:42 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2019-07-27 20:28:42 +0200 |
commit | d62225968b6700417790df0fe71007591697423d (patch) | |
tree | a5b18032ff3084e213011923e433e5fc0c417a2d /src/core | |
parent | cargen + some script (diff) | |
parent | fixed intro skip (diff) | |
download | re3-d62225968b6700417790df0fe71007591697423d.tar re3-d62225968b6700417790df0fe71007591697423d.tar.gz re3-d62225968b6700417790df0fe71007591697423d.tar.bz2 re3-d62225968b6700417790df0fe71007591697423d.tar.lz re3-d62225968b6700417790df0fe71007591697423d.tar.xz re3-d62225968b6700417790df0fe71007591697423d.tar.zst re3-d62225968b6700417790df0fe71007591697423d.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/re3.cpp | 15 |
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); |