mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Prevent problems with no vel while rolling in the future
This commit is contained in:
parent
c278ac9927
commit
08fa6a3414
@ -79,7 +79,7 @@ impl<'a> System<'a> for Sys {
|
||||
.move_dir
|
||||
.try_normalized()
|
||||
.map(|m| m)
|
||||
.unwrap_or(Vec2::from(vel.0).normalized())
|
||||
.unwrap_or(Vec2::from(vel.0).try_normalized().unwrap_or_default())
|
||||
* ROLL_SPEED
|
||||
} else {
|
||||
// Move player according to move_dir
|
||||
|
Loading…
Reference in New Issue
Block a user