mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-01-19 18:14:44 +00:00
PlayerStateMessage update rate change (#496)
* Remove crazy PlayerStateMessage update rate logic in favour of a more simple slower update if outside of render range * Remove redundant check
This commit is contained in:
parent
7af8961864
commit
8a5469f0c8
|
|
@ -1883,14 +1883,7 @@ class WorldSessionActor extends Actor
|
|||
val dist = Vector3.DistanceSquared(player.Position, pos)
|
||||
(pos, now - before, dist)
|
||||
}
|
||||
if(spectating ||
|
||||
((distanceSq < 900 || weaponInHand) && time > 200) ||
|
||||
(distanceSq < 10000 && time > 500) ||
|
||||
(distanceSq < 160000 && (
|
||||
(is_jumping || time < 200)) ||
|
||||
(!WorldEntity.isMoving(vel) && time > 2000) ||
|
||||
(time > 1000)) ||
|
||||
(distanceSq > 160000 && time > 5000)) {
|
||||
if(distanceSq < 302500 || time > 5000) { // Render distance seems to be approx 525m. Reduce update rate at ~550m to be safe
|
||||
sendResponse(
|
||||
PlayerStateMessage(
|
||||
guid,
|
||||
|
|
|
|||
Loading…
Reference in a new issue