diff options
author | smix8 <52464204+smix8@users.noreply.github.com> | 2022-05-17 20:08:39 +0200 |
---|---|---|
committer | smix8 <52464204+smix8@users.noreply.github.com> | 2022-05-17 20:08:39 +0200 |
commit | 6b51ab66d83b7c85e16189eba280a00ab5ff9536 (patch) | |
tree | 5b08b2314fc32a0fb703e9ca3c87fe3b9d42ea71 /scene/2d/navigation_obstacle_2d.h | |
parent | 3ad751f7e0b2d5c2e6ae17872666f4967f5c955d (diff) |
Make Navigation Agents and Obstacles respect parent process mode
Temporarily removes agent from navigation map when parent node cannot process due to SceneTree pause and process_mode property. Normal process_mode does not work as other agents would still avoid the paused agents because they were still active on the navigation map and the rvo world. Also fixes potential crash when region_get_map or agent_get_map is called while no map is set.
Diffstat (limited to 'scene/2d/navigation_obstacle_2d.h')
-rw-r--r-- | scene/2d/navigation_obstacle_2d.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/2d/navigation_obstacle_2d.h b/scene/2d/navigation_obstacle_2d.h index 2a0ef14e73..948cf5b61a 100644 --- a/scene/2d/navigation_obstacle_2d.h +++ b/scene/2d/navigation_obstacle_2d.h @@ -39,6 +39,7 @@ class NavigationObstacle2D : public Node { Node2D *parent_node2d = nullptr; RID agent; + RID map_before_pause; bool estimate_radius = true; real_t radius = 1.0; |