Add pathfinding interfaces, still heavily wip

This commit is contained in:
KimLS
2017-07-18 00:01:59 -07:00
parent 596e3b28b5
commit 5f1063acb9
26 changed files with 705 additions and 1181 deletions
-20
View File
@@ -2822,26 +2822,6 @@ void EntityList::ListPlayerCorpses(Client *client)
client->Message(0, "%d player corpses listed.", x);
}
void EntityList::FindPathsToAllNPCs()
{
if (!zone->pathing)
return;
auto it = npc_list.begin();
while (it != npc_list.end()) {
glm::vec3 Node0 = zone->pathing->GetPathNodeCoordinates(0, false);
glm::vec3 Dest(it->second->GetX(), it->second->GetY(), it->second->GetZ());
std::deque<int> Route = zone->pathing->FindRoute(Node0, Dest);
if (Route.empty())
printf("Unable to find a route to %s\n", it->second->GetName());
else
printf("Found a route to %s\n", it->second->GetName());
++it;
}
fflush(stdout);
}
// returns the number of corpses deleted. A negative number indicates an error code.
int32 EntityList::DeleteNPCCorpses()
{