From b4c189ab1b6233c7e7e260446e80b789f375b5d6 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sat, 11 Feb 2023 15:33:13 +0000 Subject: change from random worldgen to be based on a hash of position; implement serverside chunk unloading --- server/chunk.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/chunk.lua') diff --git a/server/chunk.lua b/server/chunk.lua index 4fb2960..1e2e135 100644 --- a/server/chunk.lua +++ b/server/chunk.lua @@ -5,7 +5,7 @@ local json = require"common.dkjson" local ChunkS = class.extend(Chunk) function ChunkS.make(cls,...) local self = Chunk.make(cls,...) - self.dirty = true + self.dirty = false return self end function ChunkS.load_from_disk(cls,cp) @@ -26,6 +26,7 @@ function ChunkS.save_if_dirty(self) f:write(self:data_packet()) f:flush() f:close() + self.dirty = false end end function ChunkS.set_at(self,...) -- cgit v1.2.3