Make sure the dummy navigation server is used automatically if the normal is disabled.

This commit is contained in:
Relintai 2023-04-16 19:10:30 +02:00
parent 88d12ace16
commit 1c505fe527
2 changed files with 5 additions and 2 deletions

View File

@ -60,10 +60,10 @@ Navigation2DServer *new_2d_server() {
void register_navigation_types(ModuleRegistrationLevel p_level) {
if (p_level == MODULE_REGISTRATION_LEVEL_SINGLETON) {
NavigationServerManager::register_server("PandemoniumNavigation", new_server);
NavigationServerManager::set_default_server("PandemoniumNavigation");
NavigationServerManager::set_default_server("PandemoniumNavigation", 10);
Navigation2DServerManager::register_server("PandemoniumNavigation", new_2d_server);
Navigation2DServerManager::set_default_server("PandemoniumNavigation");
Navigation2DServerManager::set_default_server("PandemoniumNavigation", 10);
#ifndef _3D_DISABLED
_nav_mesh_generator = memnew(NavigationMeshGenerator);

View File

@ -46,7 +46,10 @@ Navigation2DServer *new_dummy_2d_server() {
void register_navigation_dummy_types(ModuleRegistrationLevel p_level) {
if (p_level == MODULE_REGISTRATION_LEVEL_SINGLETON) {
NavigationServerManager::register_server("Dummy", new_dummy_server);
NavigationServerManager::set_default_server("Dummy");
Navigation2DServerManager::register_server("Dummy", new_dummy_2d_server);
Navigation2DServerManager::set_default_server("Dummy");
}
}