mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
feat(app): add client/server CLI arguments and init guards
This commit is contained in:
@@ -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(); }
|
||||
|
||||
Reference in New Issue
Block a user