From ceb800f1871fe085dff4f79ca89d563426f66341 Mon Sep 17 00:00:00 2001
From: Imbris <imbrisf@gmail.com>
Date: Mon, 19 Jul 2021 01:31:11 -0400
Subject: [PATCH] Fix check before calculating entity pushback, was causing a
 NaN and probably other bugs

---
 common/systems/src/phys.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/systems/src/phys.rs b/common/systems/src/phys.rs
index c619c145f8..d069f58dbb 100644
--- a/common/systems/src/phys.rs
+++ b/common/systems/src/phys.rs
@@ -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 { .. }))