From 81c7f0ae044b1131ad082e5e705c5276f82ac6ce Mon Sep 17 00:00:00 2001 From: ANAND Date: Sun, 25 Aug 2019 06:24:21 +0530 Subject: Send ActiveObjects once right after Init2 --- src/client/client.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/client/client.cpp') diff --git a/src/client/client.cpp b/src/client/client.cpp index f6be3186f..ce09f343c 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -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() && -- cgit v1.2.3