Skip to content

Commit

Permalink
shift flight handler should only tick if the player is actually shift…
Browse files Browse the repository at this point in the history
… flying
  • Loading branch information
kwazedilla committed Jan 3, 2025
1 parent 13d1d34 commit b45fa75
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit b45fa75

Please sign in to comment.