From: Lars Hofhansl Date: Thu, 1 Dec 2016 05:42:22 +0000 (-0800) Subject: Optimize block sent: Fix rendering issue X-Git-Tag: 0.4.15~89 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8a7dc838a8c1f8f2a5e9b710a8ee27d4d00715f9;p=oweals%2Fminetest.git Optimize block sent: Fix rendering issue --- diff --git a/src/client.cpp b/src/client.cpp index 5a3dc5df7..e9d273c69 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -951,7 +951,7 @@ void writePlayerPos(LocalPlayer *myplayer, ClientMap *clientMap, NetworkPacket * [12+12] s32 pitch*100 [12+12+4] s32 yaw*100 [12+12+4+4] u32 keyPressed - [12+12+4+4+1] u8 fov*80 + [12+12+4+4+4] u8 fov*80 [12+12+4+4+4+1] u8 wanted_range / MAP_BLOCKSIZE */ *pkt << position << speed << pitch << yaw << keyPressed; @@ -1338,7 +1338,7 @@ void Client::sendPlayerPos() assert(myplayer->peer_id == our_peer_id); - NetworkPacket pkt(TOSERVER_PLAYERPOS, 12 + 12 + 4 + 4 + 4); + NetworkPacket pkt(TOSERVER_PLAYERPOS, 12 + 12 + 4 + 4 + 4 + 1 + 1); writePlayerPos(myplayer, &map, &pkt); diff --git a/src/clientiface.cpp b/src/clientiface.cpp index abe878ecc..0390cf0ff 100644 --- a/src/clientiface.cpp +++ b/src/clientiface.cpp @@ -357,7 +357,7 @@ queue_full_break: } else if(nearest_emergefull_d != -1){ new_nearest_unsent_d = nearest_emergefull_d; } else { - if(d > g_settings->getS16("max_block_send_distance")){ + if(d > full_d_max){ new_nearest_unsent_d = 0; m_nothing_to_send_pause_timer = 2.0; } else { diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp index 5e50bb865..dca9aabc4 100644 --- a/src/network/serverpackethandler.cpp +++ b/src/network/serverpackethandler.cpp @@ -794,7 +794,7 @@ void Server::process_PlayerPos(RemotePlayer *player, PlayerSAO *playersao, u32 keyPressed = 0; // default behavior (in case an old client doesn't send these) - f32 fov = (72.0*M_PI/180) * 4./3.; + f32 fov = 0; u8 wanted_range = 0; if (pkt->getRemainingBytes() >= 4)