summaryrefslogtreecommitdiffhomepage
path: root/src/chunk.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-17 13:28:37 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-17 13:28:37 +0200
commit7f01dc47b0fd322d8c2b3f27eb1a94cd450a26a5 (patch)
treeac6201f9179a0315449ad46d742d2db325775eff /src/chunk.cpp
parente65ebe30d3f2af77d57cb15e5e2b30efa454b6a8 (diff)
a
Diffstat (limited to 'src/chunk.cpp')
-rw-r--r--src/chunk.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/chunk.cpp b/src/chunk.cpp
index 95904d81..d8c2d011 100644
--- a/src/chunk.cpp
+++ b/src/chunk.cpp
@@ -4,9 +4,15 @@ namespace floormat {
bool chunk::empty() const
{
+ if (!_maybe_empty)
+ return false;
+
for (const tile& x : _tiles)
if (x.ground_image || x.wall_north || x.wall_west)
+ {
+ _maybe_empty = false;
return false;
+ }
return true;
}