From f43d1cfa81aa496174af6cdfa648dab9dd17288c Mon Sep 17 00:00:00 2001 From: Lars Date: Tue, 13 Oct 2020 12:38:34 -0700 Subject: [PATCH] Rely on max_simultaneous_block_sends_per_client to limit blocks sent to the client. --- src/clientiface.cpp | 18 +----------------- src/clientiface.h | 1 - 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/clientiface.cpp b/src/clientiface.cpp index 28a0ee770..a01cba7e0 100644 --- a/src/clientiface.cpp +++ b/src/clientiface.cpp @@ -99,7 +99,6 @@ void RemoteClient::GetNextBlocks ( { // Increment timers m_nothing_to_send_pause_timer -= dtime; - m_nearest_unsent_reset_timer += dtime; if (m_nothing_to_send_pause_timer >= 0) return; @@ -154,14 +153,6 @@ void RemoteClient::GetNextBlocks ( /*infostream<<"m_nearest_unsent_reset_timer=" < 20.0f) { - m_nearest_unsent_reset_timer = 0.0f; - m_nearest_unsent_d = 0; - //infostream<<"Resetting m_nearest_unsent_d for " - // <getPlayerName(peer_id)< d_start + max_d_increment_at_time) - d_max = d_start + max_d_increment_at_time; - // cos(angle between velocity and camera) * |velocity| // Limit to 0.0f in case player moves backwards. f32 dot = rangelim(camera_dir.dotProduct(playerspeed), 0.0f, 300.0f); @@ -238,7 +222,7 @@ void RemoteClient::GetNextBlocks ( const v3s16 cam_pos_nodes = floatToInt(camera_pos, BS); s16 d; - for (d = d_start; d <= d_max; d++) { + for (d = d_start; d <= full_d_max; d++) { /* Get the border/face dot coordinates of a "d-radiused" box diff --git a/src/clientiface.h b/src/clientiface.h index 83fa6fe99..ca2af65fe 100644 --- a/src/clientiface.h +++ b/src/clientiface.h @@ -364,7 +364,6 @@ private: std::set m_blocks_sent; s16 m_nearest_unsent_d = 0; v3s16 m_last_center; - float m_nearest_unsent_reset_timer = 0.0f; const u16 m_max_simul_sends; const float m_min_time_from_building;