summaryrefslogtreecommitdiffhomepage
path: root/src/world.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.cpp')
-rw-r--r--src/world.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/world.cpp b/src/world.cpp
index ea767422..f50853cf 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -11,6 +11,13 @@ world::world() : world{initial_capacity}
world::~world() noexcept
{
_teardown = true;
+ for (auto& [k, v] : _chunks)
+ {
+ v._teardown = true;
+ v.mark_scenery_modified(true);
+ _last_chunk = {};
+ v._entities.clear();
+ }
_last_chunk = {};
_chunks.clear();
_entities.clear();