We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 45eab34 commit 2b21cacCopy full SHA for 2b21cac
src/clientmap.cpp
@@ -293,13 +293,14 @@ void ClientMap::updateDrawList(video::IVideoDriver* driver)
293
float step = BS * 1;
294
float stepfac = 1.1;
295
float startoff = BS * 1;
296
- float endoff = -BS*MAP_BLOCKSIZE * 1.42 * 1.42;
+ // - Length of the diagonal of a mapblock.
297
+ float endoff = -BS * MAP_BLOCKSIZE * 1.732050807569;
298
v3s16 spn = cam_pos_nodes + v3s16(0, 0, 0);
299
s16 bs2 = MAP_BLOCKSIZE / 2 + 1;
300
u32 needed_count = 1;
301
if (occlusion_culling_enabled &&
302
isOccluded(this, spn, cpn + v3s16(0, 0, 0),
- step, stepfac, startoff, endoff, needed_count, nodemgr) &&
303
+ step, stepfac, startoff, endoff / 2, needed_count, nodemgr) &&
304
isOccluded(this, spn, cpn + v3s16(bs2,bs2,bs2),
305
step, stepfac, startoff, endoff, needed_count, nodemgr) &&
306
isOccluded(this, spn, cpn + v3s16(bs2,bs2,-bs2),
0 commit comments