summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-11 12:48:49 +0200
committeraap <aap@papnet.eu>2019-07-11 12:48:49 +0200
commit0548476ba6b9e2273ceec94ca9f62e76c69d7ef4 (patch)
treed75567838f62e4b4ef0c96d7cfacce79bf660c20 /src/core
parent3e1455cc37cfec35f77b1b933c6c16316684fe7d (diff)
CAutomobile::ProcessControlInputs
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Pad.h4
-rw-r--r--src/core/re3.cpp13
2 files changed, 16 insertions, 1 deletions
diff --git a/src/core/Pad.h b/src/core/Pad.h
index 30cdb8df..30a9980b 100644
--- a/src/core/Pad.h
+++ b/src/core/Pad.h
@@ -289,6 +289,10 @@ public:
// mouse
bool GetLeftMouseJustDown() { return !!(NewMouseControllerState.LMB && !OldMouseControllerState.LMB); }
+ bool GetRightMouseJustDown() { return !!(NewMouseControllerState.RMB && !OldMouseControllerState.RMB); }
+ bool GetMiddleMouseJustDown() { return !!(NewMouseControllerState.MMB && !OldMouseControllerState.MMB); }
+ float GetMouseX() { return NewMouseControllerState.x; }
+ float GetMouseY() { return NewMouseControllerState.y; }
// keyboard
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index 8bb9caee..4876c555 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -154,7 +154,7 @@ spawnCar(int id)
}
#endif
-void
+static void
FixCar(void)
{
CVehicle *veh = FindPlayerVehicle();
@@ -167,6 +167,15 @@ FixCar(void)
((CAutomobile*)veh)->Fix();
}
+static void
+ToggleComedy(void)
+{
+ CVehicle *veh = FindPlayerVehicle();
+ if(veh == nil)
+ return;
+ veh->bComedyControls = !veh->bComedyControls;
+}
+
void
DebugMenuPopulate(void)
{
@@ -212,6 +221,8 @@ DebugMenuPopulate(void)
DebugMenuAddCmd("Cheats", "Nasty limbs", NastyLimbsCheat);
DebugMenuAddCmd("Debug", "Fix Car", FixCar);
+ DebugMenuAddCmd("Debug", "Toggle Comedy Controls", ToggleComedy);
+
DebugMenuAddVarBool8("Debug", "Show Ped Road Groups", (int8*)&gbShowPedRoadGroups, nil);
DebugMenuAddVarBool8("Debug", "Show Car Road Groups", (int8*)&gbShowCarRoadGroups, nil);
DebugMenuAddVarBool8("Debug", "Show Collision Polys", (int8*)&gbShowCollisionPolys, nil);