Skip to content

Commit

Permalink
Fix climb jump stamina (Grasscutters#2056)
Browse files Browse the repository at this point in the history
* Fix climb jump stamina

* Update StaminaManager.java

---------

Co-authored-by: Magix <27646710+KingRainbow44@users.noreply.github.com>
  • Loading branch information
NotThorny and KingRainbow44 committed Feb 16, 2023
1 parent d1c7ced commit b4b8f1e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,13 @@ public void handleVehicleInteractReq(GameSession session, int vehicleId, Vehicle
// Internal handler

private void handleImmediateStamina(GameSession session, @NotNull MotionState motionState) {
if (currentState == motionState) return;
if (currentState == motionState) {
if (motionState.equals(MotionState.MOTION_STATE_CLIMB_JUMP)) {
updateStaminaRelative(session, new Consumption(ConsumptionType.CLIMB_JUMP), true);
}
return;
}

switch (motionState) {
case MOTION_STATE_CLIMB ->
updateStaminaRelative(session, new Consumption(ConsumptionType.CLIMB_START), true);
Expand Down

0 comments on commit b4b8f1e

Please sign in to comment.