mirror of
https://github.com/minetest/minetest.git
synced 2024-11-10 01:33:46 +01:00
Don't send position update packet if player is dead
This commit is contained in:
parent
3c395d908f
commit
fb6f1fdcbe
@ -1244,7 +1244,11 @@ void Client::sendPlayerPos()
|
|||||||
u8 camera_fov = map.getCameraFov();
|
u8 camera_fov = map.getCameraFov();
|
||||||
u8 wanted_range = map.getControl().wanted_range;
|
u8 wanted_range = map.getControl().wanted_range;
|
||||||
|
|
||||||
// Save bandwidth by only updating position when something changed
|
// Save bandwidth by only updating position when
|
||||||
|
// player is not dead and something changed
|
||||||
|
if (myplayer->isDead())
|
||||||
|
return;
|
||||||
|
|
||||||
if (myplayer->last_position == myplayer->getPosition() &&
|
if (myplayer->last_position == myplayer->getPosition() &&
|
||||||
myplayer->last_speed == myplayer->getSpeed() &&
|
myplayer->last_speed == myplayer->getSpeed() &&
|
||||||
myplayer->last_pitch == myplayer->getPitch() &&
|
myplayer->last_pitch == myplayer->getPitch() &&
|
||||||
|
Loading…
Reference in New Issue
Block a user