From b45fa759718569bd9e293bba300a8c7ab67931f5 Mon Sep 17 00:00:00 2001 From: kwazedilla Date: Fri, 3 Jan 2025 15:42:48 -0800 Subject: [PATCH] shift flight handler should only tick if the player is actually shift flying --- .../features/starship/control/input/ShiftFlightHandler.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main/kotlin/net/horizonsend/ion/server/features/starship/control/input/ShiftFlightHandler.kt b/server/src/main/kotlin/net/horizonsend/ion/server/features/starship/control/input/ShiftFlightHandler.kt index 55ee397bf4..6b22f20552 100644 --- a/server/src/main/kotlin/net/horizonsend/ion/server/features/starship/control/input/ShiftFlightHandler.kt +++ b/server/src/main/kotlin/net/horizonsend/ion/server/features/starship/control/input/ShiftFlightHandler.kt @@ -32,6 +32,8 @@ class ShiftFlightHandler(controller: PlayerController) : PlayerMovementInputHand } override fun tick() { + if (!controller.isSneakFlying()) return + if (starship.type == StarshipType.PLATFORM) { controller.userErrorAction("This ship type is not capable of moving.") return @@ -42,8 +44,6 @@ class ShiftFlightHandler(controller: PlayerController) : PlayerMovementInputHand return } - if (!controller.isSneakFlying()) return - val now = System.currentTimeMillis() if (now - starship.lastManualMove < starship.manualMoveCooldownMillis) return