From 0eddcd119e344ea4e06f2ad9fd19d75d9942b6f1 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Thu, 18 Jul 2024 19:41:55 +1000 Subject: [PATCH] Fix can't use Q/E as hotkeys when hacks disabled (Thanks Goodly) --- src/Entity.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Entity.c b/src/Entity.c index 148a913d4..62dd1e95a 100644 --- a/src/Entity.c +++ b/src/Entity.c @@ -966,13 +966,15 @@ static void LocalPlayer_ReleaseSpeed(int key, struct InputDevice* device) { static cc_bool LocalPlayer_TriggerFlyUp(int key, struct InputDevice* device) { - LocalPlayer_Get(device->index)->Hacks.FlyingUp = true; - return true; + struct HacksComp* hacks = &LocalPlayer_Get(device->index)->Hacks; + hacks->FlyingUp = true; + return hacks->CanFly && hacks->Enabled; } static cc_bool LocalPlayer_TriggerFlyDown(int key, struct InputDevice* device) { - LocalPlayer_Get(device->index)->Hacks.FlyingDown = true; - return true; + struct HacksComp* hacks = &LocalPlayer_Get(device->index)->Hacks; + hacks->FlyingDown = true; + return hacks->CanFly && hacks->Enabled; } static void LocalPlayer_ReleaseFlyUp(int key, struct InputDevice* device) {