From 565e337f76ea1aa906500dd2307bc16e65a62f99 Mon Sep 17 00:00:00 2001 From: juliancoffee Date: Fri, 13 Aug 2021 23:16:38 +0300 Subject: [PATCH] Make is_mid_air use on_surface().is_none() --- common/systems/src/phys.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/systems/src/phys.rs b/common/systems/src/phys.rs index a252eb244b..e404e24c72 100644 --- a/common/systems/src/phys.rs +++ b/common/systems/src/phys.rs @@ -318,9 +318,7 @@ impl<'a> PhysicsData<'a> { char_state_maybe, )| { let is_sticky = sticky.is_some(); - // Code reviewers: remind me to check why on_ground was true instead of false - // here? - let is_mid_air = physics.on_wall.is_none() && physics.on_ground.is_some(); + let is_mid_air = physics.on_surface().is_none(); let mut entity_entity_collision_checks = 0; let mut entity_entity_collisions = 0;