diff options
author | smix8 <52464204+smix8@users.noreply.github.com> | 2023-03-14 04:20:57 +0100 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-03-27 17:30:03 +0200 |
commit | ac1b26c7c51e71e5d98a18fb4ad779de1b572a5f (patch) | |
tree | 7506cc4532a8f64fd422dbc39eb3b3b2d527a7a6 /modules | |
parent | f089782411eaecde5a858607b6c6c7d218ee162a (diff) |
Fix agents with disabled avoidance getting added to avoidance simulation
Fixes that agents with disabled avoidance were getting added to avoidance simulation.
(cherry picked from commit 64ce93cee9eba8b700b236f22199ee2ffd755444)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/navigation/nav_map.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/navigation/nav_map.cpp b/modules/navigation/nav_map.cpp index b1674c8fc5..4dcdbd6446 100644 --- a/modules/navigation/nav_map.cpp +++ b/modules/navigation/nav_map.cpp @@ -894,9 +894,9 @@ void NavMap::sync() { if (agents_dirty) { // cannot use LocalVector here as RVO library expects std::vector to build KdTree std::vector<RVO::Agent *> raw_agents; - raw_agents.reserve(agents.size()); - for (NavAgent *agent : agents) { - raw_agents.push_back(agent->get_agent()); + raw_agents.reserve(controlled_agents.size()); + for (NavAgent *controlled_agent : controlled_agents) { + raw_agents.push_back(controlled_agent->get_agent()); } rvo.buildAgentTree(raw_agents); } |