Reenabled physics rejection logging

This commit is contained in:
Joshua Barretto 2023-07-01 09:40:57 +01:00
parent 9a0aa5d552
commit 598f628858

View File

@ -21,7 +21,7 @@ use core::mem;
use rayon::prelude::*; use rayon::prelude::*;
use specs::{Entities, Join, Read, ReadExpect, ReadStorage, Write, WriteStorage}; use specs::{Entities, Join, Read, ReadExpect, ReadStorage, Write, WriteStorage};
use std::{borrow::Cow, time::Instant}; use std::{borrow::Cow, time::Instant};
use tracing::{debug, trace}; use tracing::{debug, trace, warn};
use vek::*; use vek::*;
#[cfg(feature = "persistent_world")] #[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 // TODO: Log when false positives aren't generated often
// let alias = maybe_player.map(|p| &p.alias); let alias = maybe_player.map(|p| &p.alias);
// match rejection { match rejection {
// Rejection::TooFar { old, new } => warn!("Rejected physics for player {alias:?} (new position {new:?} is too far from old position {old:?})"), 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)"), Rejection::TooFast { vel } => warn!("Rejected physics for player {alias:?} (new velocity {vel:?} is too fast)"),
// } }
/* /*
// Perhaps this is overzealous? // Perhaps this is overzealous?