Backported from godot4: Keep NavigationServer active while SceneTree is paused.

- smix8
4b0dee080e
This commit is contained in:
Relintai 2023-09-02 12:57:35 +02:00
parent d1d8f8505e
commit 8467cf9e94

View File

@ -1137,9 +1137,10 @@ void SceneTree::set_pause(bool p_enabled) {
return;
}
pause = p_enabled;
NavigationServer::get_singleton()->set_active(!p_enabled);
PhysicsServer::get_singleton()->set_active(!p_enabled);
Physics2DServer::get_singleton()->set_active(!p_enabled);
if (get_root()) {
get_root()->propagate_notification(p_enabled ? Node::NOTIFICATION_PAUSED : Node::NOTIFICATION_UNPAUSED);
}