Move server initialization afterMODULE_REGISTRATION_LEVEL_SERVER.

This commit is contained in:
Relintai 2023-06-06 07:47:05 +02:00
parent 3612f2db50
commit de7d96cc6d

View File

@ -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_DRIVER);
register_module_types(ModuleRegistrationLevel::MODULE_REGISTRATION_LEVEL_PLATFORM); register_module_types(ModuleRegistrationLevel::MODULE_REGISTRATION_LEVEL_PLATFORM);
register_module_types(ModuleRegistrationLevel::MODULE_REGISTRATION_LEVEL_SERVER); 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); register_module_types(ModuleRegistrationLevel::MODULE_REGISTRATION_LEVEL_SCENE);
if (Engine::get_singleton()->is_editor_hint()) { if (Engine::get_singleton()->is_editor_hint()) {
register_module_types(ModuleRegistrationLevel::MODULE_REGISTRATION_LEVEL_EDITOR); 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(); register_driver_types();
// This loads global classes, so it must happen before custom loaders and savers are registered // This loads global classes, so it must happen before custom loaders and savers are registered