diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-01 16:35:03 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-01 16:35:03 +0100 |
commit | 704e9bd3ac58484a5209e186798076f1cbd432ef (patch) | |
tree | 511479ebd088d5c9524803c6f3fe4641009b58bc /src/chunk.cpp | |
parent | 7ff1f0911e0b0c314d6e639887b705d6fc0d78aa (diff) |
wip
Diffstat (limited to 'src/chunk.cpp')
-rw-r--r-- | src/chunk.cpp | 6 |
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; } |