Fix jumping in water and mid-air
@@ -709,8 +709,11 @@ private void walk(final CharacterMovementComponent movementComp, final Character
movementComp.numberOfJumpsLeft--;
}
+ if (state.isGrounded()) {
+ movementComp.numberOfJumpsLeft--;
state.setGrounded(false);
}
+ }
if (input.isFirstRun() && moveResult.isHorizontalHit()) {
Vector3f hitVelocity = new Vector3f(state.getVelocity());
hitVelocity.x += (distanceMoved.x / moveDelta.x) * (endVelocity.x - state.getVelocity().x);
