Merge branch 'sam/fix-debug-stick' into 'master'

Fix NaN Errors

See merge request veloren/veloren!2009
This commit is contained in:
Samuel Keiffer 2021-03-27 23:40:19 +00:00
commit c8c086d0f7

View File

@ -52,7 +52,7 @@ impl CharacterBehavior for Data {
if input_is_pressed(data, self.static_data.ability_info.input) {
reset_state(self, data, &mut update);
} else {
update.vel.0 = update.vel.0.normalized()
update.vel.0 = update.vel.0.try_normalized().unwrap_or_default()
* update
.vel
.0