From 34cdd2d7f54532176b7c77f75a975842843a2c73 Mon Sep 17 00:00:00 2001 From: Antonios Barotsis Date: Tue, 4 Apr 2023 23:25:11 +0200 Subject: [PATCH] fmt --- server/src/events/entity_manipulation.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/server/src/events/entity_manipulation.rs b/server/src/events/entity_manipulation.rs index 70d81a2081..7efa635355 100644 --- a/server/src/events/entity_manipulation.rs +++ b/server/src/events/entity_manipulation.rs @@ -543,13 +543,15 @@ pub fn handle_delete(server: &mut Server, entity: EcsEntity) { pub fn handle_land_on_ground(server: &Server, entity: EcsEntity, vel: Vec3) { let ecs = server.state.ecs(); - // The second part of this if statement disables all fall damage when in the water. This was - // added as a *temporary* fix a bug that causes you to take fall damage while swimming downwards. - // FIXME: Fix the actual bug and remove the following relevant part of the if statement. - if vel.z <= -30.0 && ecs - .read_storage::() - .get(entity) - .map_or(true, |ps| ps.in_liquid().is_none()) + // The second part of this if statement disables all fall damage when in the + // water. This was added as a *temporary* fix a bug that causes you to take + // fall damage while swimming downwards. FIXME: Fix the actual bug and + // remove the following relevant part of the if statement. + if vel.z <= -30.0 + && ecs + .read_storage::() + .get(entity) + .map_or(true, |ps| ps.in_liquid().is_none()) { let char_states = ecs.read_storage::();