From: Daniel Karbach Date: Wed, 7 Oct 2015 15:37:14 +0000 (+0200) Subject: don't unload dangling chunks until they're saved X-Git-Url: http://git.localhorst.tv/?a=commitdiff_plain;h=c3397eb26a844ded6ddbf92c95cbb87cd3baf65d;p=blank.git don't unload dangling chunks until they're saved --- diff --git a/src/world/chunk.cpp b/src/world/chunk.cpp index 7ef09c7..452e7aa 100644 --- a/src/world/chunk.cpp +++ b/src/world/chunk.cpp @@ -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;