Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Revert #10495 and simplify.
  • Loading branch information
lhofhansl committed Nov 7, 2020
1 parent 627c22c commit 8c1871f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/clientiface.cpp
Expand Up @@ -209,6 +209,13 @@ void RemoteClient::GetNextBlocks (
s16 d_max_gen = std::min(adjustDist(m_max_gen_distance, prop_zoom_fov),
wanted_range);

s16 d_max = full_d_max;

// Don't loop very much at a time
s16 max_d_increment_at_time = 2;
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);
Expand All @@ -225,7 +232,7 @@ void RemoteClient::GetNextBlocks (
const v3s16 cam_pos_nodes = floatToInt(camera_pos, BS);

s16 d;
for (d = d_start; d <= full_d_max; d++) {
for (d = d_start; d <= d_max; d++) {
/*
Get the border/face dot coordinates of a "d-radiused"
box
Expand Down

0 comments on commit 8c1871f

Please sign in to comment.