diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index c034c1578..419735a69 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -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);