]> git.localhorst.tv Git - blank.git/blobdiff - src/world/chunk.cpp
merge common parts of pre- and unload states
[blank.git] / src / world / chunk.cpp
index 7ef09c7a465d7f21d2051895af1954c7b62cf342..452e7aa3b3cf23345c7cb1e7f085e3c5d16572c5 100644 (file)
@@ -1012,7 +1012,7 @@ Chunk::Pos ChunkStore::NextMissing() noexcept {
 
 void ChunkStore::Clean() {
        for (auto i = loaded.begin(), end = loaded.end(); i != end;) {
-               if (i->Referenced()) {
+               if (i->Referenced() || i->ShouldUpdateSave()) {
                        ++i;
                } else {
                        auto chunk = i;