summaryrefslogtreecommitdiffstats
path: root/scene/2d/navigation_obstacle_2d.cpp
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-10-31 20:14:34 -0500
committerThaddeus Crews <repiteo@outlook.com>2024-10-31 20:14:34 -0500
commit194ddfd0c469bf1d554caf62f45a9736333d2c44 (patch)
tree44b21cfc81b4da1c2a9dd54cb740e259c3fb1552 /scene/2d/navigation_obstacle_2d.cpp
parente84fae43bed7a7bc992fb276857bcb7140480a54 (diff)
parent16524a8a01408480ce2063461c8c042bc4eb3fa8 (diff)
downloadredot-engine-194ddfd0c469bf1d554caf62f45a9736333d2c44.tar.gz
Merge pull request #97257 from YeldhamDev/guess_godot_is_unity_after_all
Add "Game" editor for better runtime debugging
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;