1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Send ActiveObjects once right after Init2

This commit is contained in:
ANAND 2019-08-25 06:24:21 +05:30 committed by sfan5
parent 9acd36bf99
commit 81c7f0ae04
6 changed files with 141 additions and 119 deletions

View file

@ -1243,8 +1243,14 @@ 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 (m_activeobjects_received && myplayer->isDead())
return;
if (
myplayer->last_position == myplayer->getPosition() &&
myplayer->last_speed == myplayer->getSpeed() &&
myplayer->last_pitch == myplayer->getPitch() &&
myplayer->last_yaw == myplayer->getYaw() &&