Merge branch 'imbris/fix-nan' into 'master'

Fix check before calculating entity pushback, was causing a NaN and probably other bugs

See merge request veloren/veloren!2647
This commit is contained in:
Marcel 2021-07-19 07:35:14 +00:00
commit e11be27738

View File

@ -439,8 +439,8 @@ impl<'a> PhysicsData<'a> {
// Don't apply force when entity is a sticky which is on the
// ground (or on the wall)
if !forced_movement
&& !is_sticky
|| is_mid_air
&& (!is_sticky
|| is_mid_air)
&& diff.magnitude_squared() > 0.0
&& !is_projectile
&& !matches!(collider_other,Some(Collider::Voxel { .. }))