diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-05-21 12:39:41 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-05-21 12:39:41 +0200 |
commit | 74748a6ab8de4a93059c2f39ac46e63db54833e6 (patch) | |
tree | 449cd94369b640311c46110acbe1e153ef6cae67 /src | |
parent | 829ed2b6d796ecff5e5d998f2e57c8159e837714 (diff) |
e
Diffstat (limited to 'src')
-rw-r--r-- | src/chunk.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/chunk.cpp b/src/chunk.cpp index 3ef8902b..e0330339 100644 --- a/src/chunk.cpp +++ b/src/chunk.cpp @@ -21,13 +21,12 @@ bool chunk::empty(bool force) const noexcept { if (!force && !_maybe_empty) [[likely]] return false; + if (!_objects.isEmpty()) + return _maybe_empty = false; for (auto i = 0uz; i < TILE_COUNT; i++) - if (!_objects.isEmpty() || - _ground && _ground->atlases[i] || + if (_ground && _ground->atlases[i] || _walls && (_walls->atlases[i*2+0] || _walls->atlases[i*2+1])) return _maybe_empty = false; - if (!_objects.isEmpty()) - return false; return true; } |