From 41808140951c9ad107ebb05fe1cee6be1dd6f5c3 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 10 Jan 2024 23:05:36 +0100 Subject: a --- src/chunk-walls.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/chunk-walls.cpp b/src/chunk-walls.cpp index fc744010..67941077 100644 --- a/src/chunk-walls.cpp +++ b/src/chunk-walls.cpp @@ -169,7 +169,7 @@ GL::Mesh chunk::make_wall_mesh() { CORRADE_ASSUME(G < Group_::COUNT); - bool side_ok = true; + bool side_ok = G == Wall::Group_::side; if (!(dir.*member).is_defined) continue; @@ -187,16 +187,21 @@ GL::Mesh chunk::make_wall_mesh() if (auto t = at_offset_(pos, {0, -1}); t && t->wall_west_atlas()) corner_ok = true; } - if (auto t = at_offset_(pos, {1, -1}); t && t->wall_west_atlas()) - side_ok = false; + if (side_ok) + if (auto t = at_offset_(pos, {1, -1}); t && t->wall_west_atlas()) + side_ok = false; + if (side_ok) + if (auto t = at_offset_(pos, {1, -1}); t && t->wall_west_atlas()) + side_ok = false; } else { if (auto t = at_offset_(pos, {0, -1}); !(t && t->wall_west_atlas())) if (auto t = at_offset_(pos, {-1, 0}); t && t->wall_north_atlas()) corner_ok = true; - if (auto t = at_offset_(pos, {-1, 1}); t && t->wall_north_atlas()) - side_ok = false; + if (side_ok) + if (auto t = at_offset_(pos, {-1, 1}); t && t->wall_north_atlas()) + side_ok = false; } if (pillar_ok) [[unlikely]] -- cgit v1.2.3