Unverified Commit 2ead4393 by Rémi Verschelde Committed by GitHub

Merge pull request #36512 from AndreaCatania/AndreaCatania-patch-2

Fixed remove region method.
parents 0e724fc8 c16711b1
......@@ -545,8 +545,11 @@ void NavMap::add_region(NavRegion *p_region) {
}
void NavMap::remove_region(NavRegion *p_region) {
regions.push_back(p_region);
regenerate_links = true;
std::vector<NavRegion *>::iterator it = std::find(regions.begin(), regions.end(), p_region);
if (it != regions.end()) {
regions.erase(it);
regenerate_links = true;
}
}
bool NavMap::has_agent(RvoAgent *agent) const {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment