diff --git a/game/src/character/collisions.rs b/game/src/character/collisions.rs index 6167c50..f2c632c 100644 --- a/game/src/character/collisions.rs +++ b/game/src/character/collisions.rs @@ -79,7 +79,10 @@ pub fn modify_player_based_on_forces( level_height_offset, ); } + }else if player.current_state == CharacterState::Running { + player.override_state(CharacterState::Jumping); } + // Finally apply the velocity to the player player.position += player.velocity; @@ -100,5 +103,6 @@ pub fn modify_player_based_on_forces( return Err(()); } + Ok(()) }