mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
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:
commit
e11be27738
@ -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 { .. }))
|
||||
|
Loading…
Reference in New Issue
Block a user