mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix check before calculating entity pushback, was causing a NaN and probably other bugs
This commit is contained in:
parent
cee4dccb44
commit
d2b8a5a169
@ -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