diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2023-12-07 09:27:52 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-12-09 05:08:48 +0100 |
| commit | 459e94900d06ea79b7fb215880e336a8cba156ca (patch) | |
| tree | c099f716f75c8bbb94b77d6fcf5478ae9b72e8ca /src/chunk.cpp | |
| parent | 142a53e157d5f1f591feb2560b2e6260e4a2a249 (diff) | |
wipshit
Diffstat (limited to 'src/chunk.cpp')
| -rw-r--r-- | src/chunk.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/chunk.cpp b/src/chunk.cpp index 0b7c05b0..ca930777 100644 --- a/src/chunk.cpp +++ b/src/chunk.cpp @@ -26,7 +26,7 @@ bool chunk::empty(bool force) const noexcept if (!force && !_maybe_empty) return false; for (auto i = 0uz; i < TILE_COUNT; i++) - if (!_objects.empty() || _ground && _ground->_ground_atlases[i] || _walls && (_walls->_wall_atlases[i*2+0] || _walls->_wall_atlases[i*2+1])) + if (!_objects.empty() || _ground && _ground->_ground_atlases[i] || _walls && _walls->empty()) return _maybe_empty = false; if (!_objects.empty()) return false; @@ -34,7 +34,6 @@ bool chunk::empty(bool force) const noexcept } tile_atlas* chunk::ground_atlas_at(size_t i) const noexcept { return _ground ? _ground->_ground_atlases[i].get() : nullptr; } -tile_atlas* chunk::wall_atlas_at(size_t i) const noexcept { return _walls ? _walls->_wall_atlases[i].get() : nullptr; } tile_ref chunk::operator[](size_t idx) noexcept { return { *this, uint8_t(idx) }; } tile_proto chunk::operator[](size_t idx) const noexcept { return tile_proto(tile_ref { *const_cast<chunk*>(this), uint8_t(idx) }); } |
