End rolling when player is in the air

This commit is contained in:
timokoesters 2019-08-26 22:55:10 +02:00
parent 74677784c0
commit b725b0e9ea
No known key found for this signature in database
GPG Key ID: CD80BE9AAEE78097

View File

@ -149,7 +149,11 @@ impl<'a> System<'a> for Sys {
character.movement = Stand;
}
if !physics.on_ground && (character.movement == Stand || character.movement == Run) {
if !physics.on_ground
&& (character.movement == Stand
|| character.movement.is_roll()
|| character.movement == Run)
{
character.movement = Jump;
}
}