From de7d96cc6dfd7d73ad132e6fbc970151ebe87d3a Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 6 Jun 2023 07:47:05 +0200 Subject: [PATCH] Move server initialization afterMODULE_REGISTRATION_LEVEL_SERVER. --- main/main.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/main/main.cpp b/main/main.cpp index 70a719160..51a43a20f 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1608,6 +1608,13 @@ Error Main::setup2(Thread::ID p_main_tid_override) { register_module_types(ModuleRegistrationLevel::MODULE_REGISTRATION_LEVEL_DRIVER); register_module_types(ModuleRegistrationLevel::MODULE_REGISTRATION_LEVEL_PLATFORM); register_module_types(ModuleRegistrationLevel::MODULE_REGISTRATION_LEVEL_SERVER); + + initialize_physics(); + initialize_navigation_mesh_generator(); + initialize_navigation_server(); + + register_server_singletons(); + register_module_types(ModuleRegistrationLevel::MODULE_REGISTRATION_LEVEL_SCENE); if (Engine::get_singleton()->is_editor_hint()) { register_module_types(ModuleRegistrationLevel::MODULE_REGISTRATION_LEVEL_EDITOR); @@ -1631,11 +1638,6 @@ Error Main::setup2(Thread::ID p_main_tid_override) { } } - initialize_physics(); - initialize_navigation_mesh_generator(); - initialize_navigation_server(); - register_server_singletons(); - register_driver_types(); // This loads global classes, so it must happen before custom loaders and savers are registered