diff --git a/godot/effects/player/MovementSoundsAnimations.gd b/godot/effects/player/MovementSoundsAnimations.gd index 919b007..2213394 100644 --- a/godot/effects/player/MovementSoundsAnimations.gd +++ b/godot/effects/player/MovementSoundsAnimations.gd @@ -10,9 +10,6 @@ func jump(): var on_floor = $"../OnFootPhysics/Floor".is_on_floor var jump_intent = $"../MovementInput".jump_intent - measure = min(measure, phys.velocity.y) - print(measure) - if jump_intent and not on_floor and not played_takeoff: $Jump.play() played_takeoff = true diff --git a/godot/player/OnFootPhysics.gd b/godot/player/OnFootPhysics.gd index 6a0cec8..fecbc18 100644 --- a/godot/player/OnFootPhysics.gd +++ b/godot/player/OnFootPhysics.gd @@ -95,12 +95,13 @@ func process_falling(): if not $Floor.is_on_floor: is_falling = true just_landed = false + just_landed_medium = false just_landed_terminally = false - if velocity.y <= 5.0: + if velocity.y <= -5.0: is_falling_medium = true if is_falling_velocity_terminal(): is_falling_terminally = true - return + return just_landed = is_falling just_landed_medium = is_falling_medium just_landed_terminally = is_falling_terminally