diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-13 08:20:43 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-13 08:20:43 +0100 |
commit | d19332e515f41167bc4dab82b48d1a9e601b48d9 (patch) | |
tree | f3c206021869abf2ab0449b88fb6aa36049f5958 /draw/wall.cpp | |
parent | 0446b46673f9b93322f54f2f1034e804a240f33e (diff) |
draw: fix drawing empty tiles on unsorted mesh
Diffstat (limited to 'draw/wall.cpp')
-rw-r--r-- | draw/wall.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/draw/wall.cpp b/draw/wall.cpp index c65b19fc..35f83137 100644 --- a/draw/wall.cpp +++ b/draw/wall.cpp @@ -41,11 +41,7 @@ void wall_mesh::draw(tile_shader& shader, chunk& c) }; for (std::size_t k = 0; k < TILE_COUNT*2; k++) - { - const std::size_t i = ids[k]; - if (auto* atlas = c.wall_atlas_at(i)) - do_draw(k, atlas); - } + do_draw(k, c.wall_atlas_at(ids[k])); do_draw(TILE_COUNT*2, nullptr); #ifdef FM_DEBUG_DRAW_COUNT |