summaryrefslogtreecommitdiffstats
path: root/scene/2d/navigation_obstacle_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/navigation_obstacle_2d.cpp')
-rw-r--r--scene/2d/navigation_obstacle_2d.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/2d/navigation_obstacle_2d.cpp b/scene/2d/navigation_obstacle_2d.cpp
index 3bf90249f8..f6502a77e9 100644
--- a/scene/2d/navigation_obstacle_2d.cpp
+++ b/scene/2d/navigation_obstacle_2d.cpp
@@ -104,6 +104,7 @@ void NavigationObstacle2D::_notification(int p_what) {
#endif // DEBUG_ENABLED
} break;
+ case NOTIFICATION_SUSPENDED:
case NOTIFICATION_PAUSED: {
if (!can_process()) {
map_before_pause = map_current;
@@ -115,6 +116,13 @@ void NavigationObstacle2D::_notification(int p_what) {
NavigationServer2D::get_singleton()->obstacle_set_paused(obstacle, !can_process());
} break;
+ case NOTIFICATION_UNSUSPENDED: {
+ if (get_tree()->is_paused()) {
+ break;
+ }
+ [[fallthrough]];
+ }
+
case NOTIFICATION_UNPAUSED: {
if (!can_process()) {
map_before_pause = map_current;