mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-18 19:02:29 +00:00
Remove some of the legacy Z adjust functions conflicting with newer changes
This commit is contained in:
parent
aed1959dbe
commit
83605831ec
@ -212,22 +212,6 @@ void NPC::UpdateWaypoint(int wp_index)
|
||||
cur_wp_pause = cur->pause;
|
||||
Log(Logs::Detail, Logs::AI, "Next waypoint %d: (%.3f, %.3f, %.3f, %.3f)", wp_index, m_CurrentWayPoint.x, m_CurrentWayPoint.y, m_CurrentWayPoint.z, m_CurrentWayPoint.w);
|
||||
|
||||
//fix up pathing Z
|
||||
if (zone->HasMap() && RuleB(Map, FixPathingZAtWaypoints) && !IsBoat())
|
||||
{
|
||||
|
||||
if (!RuleB(Watermap, CheckForWaterAtWaypoints) || !zone->HasWaterMap() ||
|
||||
(zone->HasWaterMap() && !zone->watermap->InWater(glm::vec3(m_CurrentWayPoint))))
|
||||
{
|
||||
glm::vec3 dest(m_CurrentWayPoint.x, m_CurrentWayPoint.y, m_CurrentWayPoint.z);
|
||||
|
||||
float newz = zone->zonemap->FindBestZ(dest, nullptr);
|
||||
|
||||
if ((newz > -2000) && std::abs(newz - dest.z) < RuleR(Map, FixPathingZMaxDeltaWaypoint))
|
||||
m_CurrentWayPoint.z = newz + 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void NPC::CalculateNewWaypoint()
|
||||
@ -780,20 +764,6 @@ void NPC::AssignWaypoints(int32 grid)
|
||||
newwp.y = atof(row[1]);
|
||||
newwp.z = atof(row[2]);
|
||||
|
||||
if (zone->HasMap() && RuleB(Map, FixPathingZWhenLoading))
|
||||
{
|
||||
auto positon = glm::vec3(newwp.x, newwp.y, newwp.z);
|
||||
if (!RuleB(Watermap, CheckWaypointsInWaterWhenLoading) || !zone->HasWaterMap() ||
|
||||
(zone->HasWaterMap() && !zone->watermap->InWater(positon)))
|
||||
{
|
||||
glm::vec3 dest(newwp.x, newwp.y, newwp.z);
|
||||
float newz = zone->zonemap->FindBestZ(dest, nullptr);
|
||||
|
||||
if ((newz > -2000) && std::abs(newz - dest.z) < RuleR(Map, FixPathingZMaxDeltaLoading))
|
||||
newwp.z = newz + 1;
|
||||
}
|
||||
}
|
||||
|
||||
newwp.pause = atoi(row[3]);
|
||||
newwp.heading = atof(row[4]);
|
||||
Waypoints.push_back(newwp);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user