From 598f62885816f16662b9e4496f5657a4c70b3729 Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Sat, 1 Jul 2023 09:40:57 +0100 Subject: [PATCH] Reenabled physics rejection logging --- server/src/sys/msg/in_game.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/server/src/sys/msg/in_game.rs b/server/src/sys/msg/in_game.rs index 2eb13529e4..0be76e61c3 100644 --- a/server/src/sys/msg/in_game.rs +++ b/server/src/sys/msg/in_game.rs @@ -21,7 +21,7 @@ use core::mem; use rayon::prelude::*; use specs::{Entities, Join, Read, ReadExpect, ReadStorage, Write, WriteStorage}; use std::{borrow::Cow, time::Instant}; -use tracing::{debug, trace}; +use tracing::{debug, trace, warn}; use vek::*; #[cfg(feature = "persistent_world")] @@ -440,13 +440,13 @@ impl<'a> System<'a> for Sys { } }; - if let Some(_rejection) = rejection { + if let Some(rejection) = rejection { // TODO: Log when false positives aren't generated often - // let alias = maybe_player.map(|p| &p.alias); - // match rejection { - // Rejection::TooFar { old, new } => warn!("Rejected physics for player {alias:?} (new position {new:?} is too far from old position {old:?})"), - // Rejection::TooFast { vel } => warn!("Rejected physics for player {alias:?} (new velocity {vel:?} is too fast)"), - // } + let alias = maybe_player.map(|p| &p.alias); + match rejection { + Rejection::TooFar { old, new } => warn!("Rejected physics for player {alias:?} (new position {new:?} is too far from old position {old:?})"), + Rejection::TooFast { vel } => warn!("Rejected physics for player {alias:?} (new velocity {vel:?} is too fast)"), + } /* // Perhaps this is overzealous?