I spent most of the day pouring over waypoints and pathing, and came across something interesting. Hopefully this wasn't the result of another local change, but the GIT code looks pretty clear.
At the end of NPC::AssignWaypoints we have the following:
Code:
} else if(!GridErr && !WPErr) {
UpdateWaypoint(0);
SetWaypointPause();
if (wandertype == 1 || wandertype == 2 || wandertype == 5)
CalculateNewWaypoint();
} else {
UpdateWaypoint(0) starts us off on the first waypoint (sets cur_wp).
SetWaypointPause() waits at the current location for the pause (depending on pausetype) to expire. The NPC stands there for a bit... and then CalculateNewWaypoint is called.
Now one might say "wait a minute, that is only for those 3 wandertypes",
but alas there is another path. In AI_DoMovement there is the
following (which occurs when the AIwalking_timer expires):
Code:
if(gridno > 0) {
CastToNPC()->CalculateNewWaypoint();
Of course the mob has a grid, that is what AssignWaypoints assigned.
And CalculateNewWaypoint moves to the next waypoint and resumes
walking (via UpdateWaypoint at the end).
The effect is to skip over the first waypoint in the grid.
I have had good luck with just removing the pause in AssignWaypoints.
(If I wanted to wait at the current spot, I would have delayed the call
to AssignWaypoints. Personally I want the mob to start moving the
moment it gets a grid. I may be in the minority...)
By removing the pause, the NPC was confirmed to start moving immediately
upon grid assign, and head to the first waypoint on the grid.
Code:
diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp
index e9257d5..f756dc2 100644
--- a/zone/waypoints.cpp
+++ b/zone/waypoints.cpp
@@ -953,7 +953,6 @@ void NPC::AssignWaypoints(int32 grid) {
roamer = false;
} else if(!GridErr && !WPErr) {
UpdateWaypoint(0);
- SetWaypointPause();
if (wandertype == 1 || wandertype == 2 || wandertype == 5)
CalculateNewWaypoint();
} else {