File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -209,6 +209,13 @@ void RemoteClient::GetNextBlocks (
209209 s16 d_max_gen = std::min (adjustDist (m_max_gen_distance, prop_zoom_fov),
210210 wanted_range);
211211
212+ s16 d_max = full_d_max;
213+
214+ // Don't loop very much at a time
215+ s16 max_d_increment_at_time = 2 ;
216+ if (d_max > d_start + max_d_increment_at_time)
217+ d_max = d_start + max_d_increment_at_time;
218+
212219 // cos(angle between velocity and camera) * |velocity|
213220 // Limit to 0.0f in case player moves backwards.
214221 f32 dot = rangelim (camera_dir.dotProduct (playerspeed), 0 .0f , 300 .0f );
@@ -225,7 +232,7 @@ void RemoteClient::GetNextBlocks (
225232 const v3s16 cam_pos_nodes = floatToInt (camera_pos, BS);
226233
227234 s16 d;
228- for (d = d_start; d <= full_d_max ; d++) {
235+ for (d = d_start; d <= d_max ; d++) {
229236 /*
230237 Get the border/face dot coordinates of a "d-radiused"
231238 box
You can’t perform that action at this time.
0 commit comments