feat(app): add client/server CLI arguments and init guards

This commit is contained in:
2026-06-26 13:48:07 +08:00
parent fbb6fe2fa6
commit 3c14a4ffe1
16 changed files with 164 additions and 39 deletions

View File

@@ -15,6 +15,9 @@ namespace Cubed {
ServerWorld::ServerWorld() {}
ServerWorld::~ServerWorld() {
if (!m_init) {
return;
}
stop_gen_thread();
stop_server_thread();
wait_all_chunk_tasks();
@@ -60,6 +63,7 @@ void ServerWorld::init_world() {
Logger::info("Chunk Block Init Finish, Time Consuming: {}", d);
start_server_thread();
m_init = true;
}
void ServerWorld::init_chunks() { hot_reload(); }