Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/helpers/HierarchicalPathfinder.cpp
Show First 20 Lines • Show All 698 Lines • ▼ Show 20 Lines | if (dist2 < dist2Best) | ||||
dist2Best = dist2; | dist2Best = dist2; | ||||
} | } | ||||
} | } | ||||
iGoal = iBest; | iGoal = iBest; | ||||
jGoal = jBest; | jGoal = jBest; | ||||
} | } | ||||
void HierarchicalPathfinder::FindReachableRegions(RegionID from, std::set<RegionID>& reachable, pass_class_t passClass) | void HierarchicalPathfinder::FindReachableRegions(RegionID from, std::unordered_set<RegionID>& reachable, pass_class_t passClass) | ||||
{ | { | ||||
// Flood-fill the region graph, starting at 'from', | // Flood-fill the region graph, starting at 'from', | ||||
// collecting all the regions that are reachable via edges | // collecting all the regions that are reachable via edges | ||||
std::vector<RegionID> open; | std::vector<RegionID> open; | ||||
open.push_back(from); | open.push_back(from); | ||||
reachable.insert(from); | reachable.insert(from); | ||||
▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator