diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-05-02 16:34:05 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-05-02 22:35:39 +0200 |
commit | 6abcd7d52cda334c58ec999d212491fc24f13c9d (patch) | |
tree | 86998508afe8eb7447ad70a2d5beebdbc9995a8f /main | |
parent | 03b67a512ec9ef1cf5c337aa5c47a5a76d4a8a61 (diff) |
script lifecycle mostly implemented
Diffstat (limited to 'main')
-rw-r--r-- | main/ctor.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/main/ctor.cpp b/main/ctor.cpp index 35968535..3508b7cd 100644 --- a/main/ctor.cpp +++ b/main/ctor.cpp @@ -2,6 +2,7 @@ #include "compat/fpu.hpp" #include "src/search-astar.hpp" #include "src/search.hpp" +#include "src/chunk.hpp" #include <algorithm> #include <Corrade/Containers/GrowableArray.h> @@ -29,6 +30,11 @@ main_impl::main_impl(floormat_app& app, fm_settings&& se, int& argc, char** argv class world& main_impl::reset_world(class world&& w) noexcept { arrayResize(_clickable_scenery, 0); + + for (auto& [_, cʹ] : _world.chunks()) + for (const auto& eʹ : cʹ.objects()) + fm_assert(eʹ.use_count() == 1); + _world = move(w); _first_frame = true; return _world; |