summaryrefslogtreecommitdiffhomepage
path: root/draw/floor.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-13 08:20:43 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-13 08:20:43 +0100
commitd19332e515f41167bc4dab82b48d1a9e601b48d9 (patch)
treef3c206021869abf2ab0449b88fb6aa36049f5958 /draw/floor.cpp
parent0446b46673f9b93322f54f2f1034e804a240f33e (diff)
draw: fix drawing empty tiles on unsorted mesh
Diffstat (limited to 'draw/floor.cpp')
-rw-r--r--draw/floor.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/draw/floor.cpp b/draw/floor.cpp
index 635b8d8f..1a5c908e 100644
--- a/draw/floor.cpp
+++ b/draw/floor.cpp
@@ -39,8 +39,7 @@ void floor_mesh::draw(tile_shader& shader, chunk& c)
};
for (std::size_t k = 0; k < TILE_COUNT; k++)
- if (auto* atlas = c.ground_atlas_at(ids[k]))
- do_draw(k, atlas);
+ do_draw(k, c.ground_atlas_at(ids[k]));
do_draw(TILE_COUNT, nullptr);
#ifdef FM_DEBUG_DRAW_COUNT