Switch path stuff to vectors

This should be more CPU cache friendly compared to lists so should
be faster. (profiling looked promising)
This commit is contained in:
Michael Cook (mackal)
2014-12-17 01:52:00 -05:00
parent 5099010840
commit a14f8058da
7 changed files with 39 additions and 38 deletions
+1 -1
View File
@@ -2636,7 +2636,7 @@ void EntityList::FindPathsToAllNPCs()
while (it != npc_list.end()) {
Map::Vertex Node0 = zone->pathing->GetPathNodeCoordinates(0, false);
Map::Vertex Dest(it->second->GetX(), it->second->GetY(), it->second->GetZ());
std::list<int> Route = zone->pathing->FindRoute(Node0, Dest);
std::vector<int> Route = zone->pathing->FindRoute(Node0, Dest);
if (Route.size() == 0)
printf("Unable to find a route to %s\n", it->second->GetName());
else