summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-03-22 15:43:59 +0500
committeruntodesu <kirill@untode.su>2025-03-22 15:43:59 +0500
commit1d0a621722f35d1a742ba8f5503ff1efa725d2d0 (patch)
treecf6d95a3a9557b3981a84b2bd72bb21ac67fe8c0
parente34a973f647bc6b7814ad1f3e837689f8478b84a (diff)
downloadvoxelius-1d0a621722f35d1a742ba8f5503ff1efa725d2d0.tar.bz2
voxelius-1d0a621722f35d1a742ba8f5503ff1efa725d2d0.zip
Fix aggressive caching being a config value
-rw-r--r--game/server/worldgen.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/game/server/worldgen.cc b/game/server/worldgen.cc
index 4fc37c7..ef3c11e 100644
--- a/game/server/worldgen.cc
+++ b/game/server/worldgen.cc
@@ -1,7 +1,7 @@
#include "server/pch.hh"
#include "server/worldgen.hh"
-#include "core/config.hh"
+#include "core/cmdline.hh"
#include "shared/chunk.hh"
#include "shared/dimension.hh"
@@ -12,7 +12,7 @@
#include "server/inhabited.hh"
#include "server/sessions.hh"
-static ConfigBoolean aggressive_caching(false);
+static bool aggressive_caching;
static emhash8::HashMap<Dimension *, emhash8::HashMap<chunk_pos, std::unordered_set<Session *>>> active_tasks;
@@ -66,7 +66,7 @@ void WorldgenTask::finalize(void)
auto chunk = m_dimension->create_chunk(m_cpos);
chunk->set_voxels(m_voxels);
- if(aggressive_caching.get_value()) {
+ if(aggressive_caching) {
// Marking the chunk with InhabitedComponent makes
// it so that it is saved regardles of whether it was
// modified by players or not. This isn't particularly
@@ -100,7 +100,7 @@ void WorldgenTask::finalize(void)
void worldgen::init(void)
{
- globals::server_config.add_value("worldgen.aggressive_caching", aggressive_caching);
+ aggressive_caching = cmdline::contains("aggressive-caching");
}
bool worldgen::is_generating(Dimension *dimension, const chunk_pos &cpos)