mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Make physics anticheat less aggressive.
This commit is contained in:
parent
a1d9ba15d9
commit
513c7ff068
@ -119,8 +119,11 @@ impl Sys {
|
|||||||
// live server (and also mitigates some floating-point overflow crashes)
|
// live server (and also mitigates some floating-point overflow crashes)
|
||||||
if let Some(prev_pos) = positions.get(entity) {
|
if let Some(prev_pos) = positions.get(entity) {
|
||||||
let value_squared = prev_pos.0.distance_squared(pos.0);
|
let value_squared = prev_pos.0.distance_squared(pos.0);
|
||||||
if value_squared > (5000.0f32).powf(2.0) {
|
if value_squared > (500.0f32).powf(2.0) {
|
||||||
setting.server_force = true;
|
// for position, this gets triggered too often by legitimate
|
||||||
|
// teleports (since the client has the old location for a few
|
||||||
|
// frames) so only reject the individual updates, don't force
|
||||||
|
// server-authoritative physics for them
|
||||||
reject_update = true;
|
reject_update = true;
|
||||||
warn!(
|
warn!(
|
||||||
"PlayerPhysics position exceeded {:?} {:?} {:?}",
|
"PlayerPhysics position exceeded {:?} {:?} {:?}",
|
||||||
|
Loading…
Reference in New Issue
Block a user