summaryrefslogtreecommitdiffhomepage
path: root/src/chunk.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-02-25 19:20:29 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-02-25 19:20:29 +0100
commit8d0c254f45f3754142996d45434a67ec7ebc5dd9 (patch)
tree5ed904577967440cb7f9c37e9321d8f311f2f4d2 /src/chunk.cpp
parentbd2aa935bfc2b377481ca5900d0d89168a507eae (diff)
remove cached pass_region from chunk
This wasn't well thought out because the regiojn gets dirtied after every critter movement, even though it ignores critters by default.
Diffstat (limited to 'src/chunk.cpp')
-rw-r--r--src/chunk.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/chunk.cpp b/src/chunk.cpp
index 18b8a6f1..a3c03b81 100644
--- a/src/chunk.cpp
+++ b/src/chunk.cpp
@@ -126,7 +126,6 @@ void chunk::mark_passability_modified() noexcept
if (!_pass_modified && is_log_verbose()) [[unlikely]]
fm_debug("pass reload %zu", ++_reload_no_);
_pass_modified = true;
- _region_modified = true;
}
bool chunk::is_passability_modified() const noexcept { return _pass_modified; }
@@ -153,7 +152,6 @@ chunk::~chunk() noexcept
arrayResize(_objects, 0);
arrayShrink(_objects);
_rtree->RemoveAll();
- delete_pass_region(_region);
}
chunk::chunk(chunk&&) noexcept = default;
@@ -162,7 +160,6 @@ chunk& chunk::operator=(chunk&&) noexcept = default;
void chunk::add_object_unsorted(const std::shared_ptr<object>& e)
{
_objects_sorted = false;
- _region_modified = true;
if (!e->is_dynamic())
mark_scenery_modified();
if (bbox bb; _bbox_for_scenery(*e, bb))
@@ -185,7 +182,6 @@ void chunk::sort_objects()
void chunk::add_object(const std::shared_ptr<object>& e)
{
fm_assert(_objects_sorted);
- _region_modified = true;
if (!e->is_dynamic())
mark_scenery_modified();
if (bbox bb; _bbox_for_scenery(*e, bb))
@@ -199,7 +195,6 @@ void chunk::add_object(const std::shared_ptr<object>& e)
void chunk::remove_object(size_t i)
{
fm_assert(_objects_sorted);
- _region_modified = true;
auto& es = _objects;
fm_debug_assert(i < es.size());
const auto e = es[i];