@@ -99,7 +99,6 @@ void RemoteClient::GetNextBlocks (
99
99
{
100
100
// Increment timers
101
101
m_nothing_to_send_pause_timer -= dtime;
102
- m_nearest_unsent_reset_timer += dtime;
103
102
104
103
if (m_nothing_to_send_pause_timer >= 0 )
105
104
return ;
@@ -154,14 +153,6 @@ void RemoteClient::GetNextBlocks (
154
153
/* infostream<<"m_nearest_unsent_reset_timer="
155
154
<<m_nearest_unsent_reset_timer<<std::endl;*/
156
155
157
- // Reset periodically to workaround for some bugs or stuff
158
- if (m_nearest_unsent_reset_timer > 20 .0f ) {
159
- m_nearest_unsent_reset_timer = 0 .0f ;
160
- m_nearest_unsent_d = 0 ;
161
- // infostream<<"Resetting m_nearest_unsent_d for "
162
- // <<server->getPlayerName(peer_id)<<std::endl;
163
- }
164
-
165
156
// s16 last_nearest_unsent_d = m_nearest_unsent_d;
166
157
s16 d_start = m_nearest_unsent_d;
167
158
@@ -212,16 +203,9 @@ void RemoteClient::GetNextBlocks (
212
203
wanted_range);
213
204
const s16 d_blocks_in_sight = full_d_max * BS * MAP_BLOCKSIZE;
214
205
215
- s16 d_max = full_d_max;
216
206
s16 d_max_gen = std::min (adjustDist (m_max_gen_distance, prop_zoom_fov),
217
207
wanted_range);
218
208
219
- // Don't loop very much at a time, adjust with distance,
220
- // do more work per RTT with greater distances.
221
- s16 max_d_increment_at_time = full_d_max / 9 + 1 ;
222
- if (d_max > d_start + max_d_increment_at_time)
223
- d_max = d_start + max_d_increment_at_time;
224
-
225
209
// cos(angle between velocity and camera) * |velocity|
226
210
// Limit to 0.0f in case player moves backwards.
227
211
f32 dot = rangelim (camera_dir.dotProduct (playerspeed), 0 .0f , 300 .0f );
@@ -238,7 +222,7 @@ void RemoteClient::GetNextBlocks (
238
222
const v3s16 cam_pos_nodes = floatToInt (camera_pos, BS);
239
223
240
224
s16 d;
241
- for (d = d_start; d <= d_max ; d++) {
225
+ for (d = d_start; d <= full_d_max ; d++) {
242
226
/*
243
227
Get the border/face dot coordinates of a "d-radiused"
244
228
box
0 commit comments