aboutsummaryrefslogtreecommitdiff
path: root/src/client/game.cpp
diff options
context:
space:
mode:
authorx2048 <codeforsmile@gmail.com>2021-09-27 17:46:08 +0200
committerGitHub <noreply@github.com>2021-09-27 17:46:08 +0200
commitf5040707fe7cf9f24274379598527d6298c5818c (patch)
tree54eebe9df1e8eabf58b077069ecd02f52b3c8f83 /src/client/game.cpp
parentd51d0f3a5a60679436bf7d4e1980f3a82f229848 (diff)
downloadminetest-f5040707fe7cf9f24274379598527d6298c5818c.tar.gz
minetest-f5040707fe7cf9f24274379598527d6298c5818c.tar.bz2
minetest-f5040707fe7cf9f24274379598527d6298c5818c.zip
Order drawlist by distance to the camera when rendering (#11651)
Diffstat (limited to 'src/client/game.cpp')
-rw-r--r--src/client/game.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp
index f7fd7abf9..a6448f40d 100644
--- a/src/client/game.cpp
+++ b/src/client/game.cpp
@@ -3897,8 +3897,8 @@ void Game::updateFrame(ProfilerGraph *graph, RunStats *stats, f32 dtime,
v3f camera_direction = camera->getDirection();
if (runData.update_draw_list_timer >= update_draw_list_delta
|| runData.update_draw_list_last_cam_dir.getDistanceFrom(camera_direction) > 0.2
- || m_camera_offset_changed) {
-
+ || m_camera_offset_changed
+ || client->getEnv().getClientMap().needsUpdateDrawList()) {
runData.update_draw_list_timer = 0;
client->getEnv().getClientMap().updateDrawList();
runData.update_draw_list_last_cam_dir = camera_direction;