summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/clientiface.cpp18
-rw-r--r--src/clientiface.h1
2 files changed, 1 insertions, 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="
<<m_nearest_unsent_reset_timer<<std::endl;*/
- // Reset periodically to workaround for some bugs or stuff
- if (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 "
- // <<server->getPlayerName(peer_id)<<std::endl;
- }
-
//s16 last_nearest_unsent_d = m_nearest_unsent_d;
s16 d_start = m_nearest_unsent_d;
@@ -212,16 +203,9 @@ void RemoteClient::GetNextBlocks (
wanted_range);
const s16 d_blocks_in_sight = full_d_max * BS * MAP_BLOCKSIZE;
- s16 d_max = full_d_max;
s16 d_max_gen = std::min(adjustDist(m_max_gen_distance, prop_zoom_fov),
wanted_range);
- // Don't loop very much at a time, adjust with distance,
- // do more work per RTT with greater distances.
- s16 max_d_increment_at_time = full_d_max / 9 + 1;
- if (d_max > 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<v3s16> 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;