Partial port of der's map rewrite, no new azone format yet but it's coming. Will convert legacy map formats on the fly atm.

This commit is contained in:
KimLS
2014-02-23 21:17:28 -08:00
parent eabea6ea16
commit 951c321ba6
17 changed files with 517 additions and 842 deletions
+6 -8
View File
@@ -2554,8 +2554,8 @@ void EntityList::FindPathsToAllNPCs()
auto it = npc_list.begin();
while (it != npc_list.end()) {
VERTEX Node0 = zone->pathing->GetPathNodeCoordinates(0, false);
VERTEX Dest(it->second->GetX(), it->second->GetY(), it->second->GetZ());
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);
if (Route.size() == 0)
printf("Unable to find a route to %s\n", it->second->GetName());
@@ -3557,9 +3557,9 @@ bool Entity::CheckCoordLosNoZLeaps(float cur_x, float cur_y, float cur_z,
if (zone->zonemap == nullptr)
return true;
VERTEX myloc;
VERTEX oloc;
VERTEX hit;
Map::Vertex myloc;
Map::Vertex oloc;
Map::Vertex hit;
myloc.x = cur_x;
myloc.y = cur_y;
@@ -3572,9 +3572,7 @@ bool Entity::CheckCoordLosNoZLeaps(float cur_x, float cur_y, float cur_z,
if (myloc.x == oloc.x && myloc.y == oloc.y && myloc.z == oloc.z)
return true;
FACE *onhit;
if (!zone->zonemap->LineIntersectsZoneNoZLeaps(myloc,oloc,perwalk,&hit,&onhit))
if (!zone->zonemap->LineIntersectsZoneNoZLeaps(myloc,oloc,perwalk,&hit))
return true;
return false;
}