mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Don't send position update packet if player is dead
This commit is contained in:
parent
3c395d908f
commit
fb6f1fdcbe
1 changed files with 6 additions and 2 deletions
|
@ -1244,8 +1244,12 @@ void Client::sendPlayerPos()
|
|||
u8 camera_fov = map.getCameraFov();
|
||||
u8 wanted_range = map.getControl().wanted_range;
|
||||
|
||||
// Save bandwidth by only updating position when something changed
|
||||
if(myplayer->last_position == myplayer->getPosition() &&
|
||||
// Save bandwidth by only updating position when
|
||||
// player is not dead and something changed
|
||||
if (myplayer->isDead())
|
||||
return;
|
||||
|
||||
if (myplayer->last_position == myplayer->getPosition() &&
|
||||
myplayer->last_speed == myplayer->getSpeed() &&
|
||||
myplayer->last_pitch == myplayer->getPitch() &&
|
||||
myplayer->last_yaw == myplayer->getYaw() &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue