diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-17 13:28:37 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-17 13:28:37 +0200 |
| commit | 7f01dc47b0fd322d8c2b3f27eb1a94cd450a26a5 (patch) | |
| tree | ac6201f9179a0315449ad46d742d2db325775eff /src/chunk.cpp | |
| parent | e65ebe30d3f2af77d57cb15e5e2b30efa454b6a8 (diff) | |
a
Diffstat (limited to 'src/chunk.cpp')
| -rw-r--r-- | src/chunk.cpp | 6 |
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; } |
