mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-26 21:57:16 +01:00
Allocate the selected navigation srevers.
This commit is contained in:
parent
86bdecbfe9
commit
aabd293f3b
@ -221,8 +221,25 @@ void finalize_physics() {
|
||||
|
||||
void initialize_navigation_server() {
|
||||
ERR_FAIL_COND(navigation_server != nullptr);
|
||||
navigation_server = NavigationServerManager::new_default_server();
|
||||
navigation_2d_server = Navigation2DServerManager::new_default_server();
|
||||
ERR_FAIL_COND(navigation_2d_server != nullptr);
|
||||
|
||||
/// 3D Navigation Server
|
||||
navigation_server = NavigationServerManager::new_server(ProjectSettings::get_singleton()->get(NavigationServerManager::setting_property_name));
|
||||
if (!navigation_server) {
|
||||
// Navigation server not found, Use the default physics
|
||||
navigation_server = NavigationServerManager::new_default_server();
|
||||
}
|
||||
ERR_FAIL_COND(!navigation_server);
|
||||
//physics_server->init();
|
||||
|
||||
/// 2D Navigation server
|
||||
navigation_2d_server = Navigation2DServerManager::new_server(ProjectSettings::get_singleton()->get(Navigation2DServerManager::setting_property_name));
|
||||
if (!navigation_2d_server) {
|
||||
// Navigation server not found, Use the default physics
|
||||
navigation_2d_server = Navigation2DServerManager::new_default_server();
|
||||
}
|
||||
ERR_FAIL_COND(!navigation_2d_server);
|
||||
//navigation_2d_server->init();
|
||||
}
|
||||
|
||||
void finalize_navigation_server() {
|
||||
|
Loading…
Reference in New Issue
Block a user