diff options
author | aap <aap@papnet.eu> | 2019-07-26 18:48:14 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2019-07-26 18:48:14 +0200 |
commit | e200eb1a2f3d754b4e9748fa0bd5c934d81ac2a2 (patch) | |
tree | 9ba3e1b6968c6b1a8043e62e5ad3cbae95066d9c /src/core | |
parent | Merge pull request #167 from Nick007J/master (diff) | |
download | re3-e200eb1a2f3d754b4e9748fa0bd5c934d81ac2a2.tar re3-e200eb1a2f3d754b4e9748fa0bd5c934d81ac2a2.tar.gz re3-e200eb1a2f3d754b4e9748fa0bd5c934d81ac2a2.tar.bz2 re3-e200eb1a2f3d754b4e9748fa0bd5c934d81ac2a2.tar.lz re3-e200eb1a2f3d754b4e9748fa0bd5c934d81ac2a2.tar.xz re3-e200eb1a2f3d754b4e9748fa0bd5c934d81ac2a2.tar.zst re3-e200eb1a2f3d754b4e9748fa0bd5c934d81ac2a2.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); |