Some pathing tweaks, removed old quest functions that dealt with the old pathing code. Fixes to best z under new system

This commit is contained in:
KimLS
2017-08-28 22:01:08 -07:00
parent 0e8f6a32b1
commit 545ac6b420
8 changed files with 124 additions and 147 deletions
+4 -5
View File
@@ -1529,13 +1529,12 @@ void NPC::AI_DoMovement() {
if (roambox_movingto_y > roambox_max_y || roambox_movingto_y < roambox_min_y)
roambox_movingto_y = zone->random.Real(roambox_min_y+1,roambox_max_y-1);
}
Log(Logs::Detail, Logs::AI, "Roam Box: d=%.3f (%.3f->%.3f,%.3f->%.3f): Go To (%.3f,%.3f)",
roambox_distance, roambox_min_x, roambox_max_x, roambox_min_y, roambox_max_y, roambox_movingto_x, roambox_movingto_y);
float new_z = this->FindGroundZ(m_Position.x, m_Position.y, 5);
new_z += (this->GetSize() / 1.55);
float new_z = this->FindGroundZ(m_Position.x, m_Position.y, 5) + GetModelOffset();
if (!CalculateNewPosition(roambox_movingto_x, roambox_movingto_y, new_z, walksp, true))
{
roambox_movingto_x = roambox_max_x + 1; // force update