summaryrefslogtreecommitdiffhomepage
path: root/src/chunk.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-01 16:35:03 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-01 16:35:03 +0100
commit704e9bd3ac58484a5209e186798076f1cbd432ef (patch)
tree511479ebd088d5c9524803c6f3fe4641009b58bc /src/chunk.cpp
parent7ff1f0911e0b0c314d6e639887b705d6fc0d78aa (diff)
wip
Diffstat (limited to 'src/chunk.cpp')
-rw-r--r--src/chunk.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/chunk.cpp b/src/chunk.cpp
index 9eca0138..59e05d73 100644
--- a/src/chunk.cpp
+++ b/src/chunk.cpp
@@ -7,12 +7,14 @@ bool chunk::empty(bool force) const noexcept
if (!force && !_maybe_empty)
return false;
- for (const tile& x : _tiles)
- if (x.ground || x.wall_north || x.wall_west)
+ for (std::size_t i = 0; i < TILE_COUNT; i++)
+ {
+ if (_ground_atlases[i] || _wall_north_atlases[i] || _wall_west_atlases[i])
{
_maybe_empty = false;
return false;
}
+ }
return true;
}