mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-04-26 06:15:21 +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
1 changed files with 1 additions and 8 deletions
|
|
@ -1883,14 +1883,7 @@ class WorldSessionActor extends Actor
|
||||||
val dist = Vector3.DistanceSquared(player.Position, pos)
|
val dist = Vector3.DistanceSquared(player.Position, pos)
|
||||||
(pos, now - before, dist)
|
(pos, now - before, dist)
|
||||||
}
|
}
|
||||||
if(spectating ||
|
if(distanceSq < 302500 || time > 5000) { // Render distance seems to be approx 525m. Reduce update rate at ~550m to be safe
|
||||||
((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)) {
|
|
||||||
sendResponse(
|
sendResponse(
|
||||||
PlayerStateMessage(
|
PlayerStateMessage(
|
||||||
guid,
|
guid,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue