Fixes for mobs on pause waypoints dancing around.

Fixes for runspeed <= 0 as reported by demonstar55
This commit is contained in:
SecretsOTheP
2015-05-26 02:27:48 -04:00
parent 4424afac94
commit 76d7fe1586
4 changed files with 18 additions and 66 deletions
+9 -7
View File
@@ -1719,14 +1719,16 @@ void NPC::AI_DoMovement() {
if (m_CurrentWayPoint.x == GetX() && m_CurrentWayPoint.y == GetY())
{ // are we there yet? then stop
Log.Out(Logs::Detail, Logs::AI, "We have reached waypoint %d (%.3f,%.3f,%.3f) on grid %d", cur_wp, GetX(), GetY(), GetZ(), GetGrid());
SetWaypointPause();
if(GetAppearance() != eaStanding)
SetAppearance(eaStanding, false);
SetMoving(false);
if (m_CurrentWayPoint.w >= 0.0) {
SetHeading(m_CurrentWayPoint.w);
if (cur_wp_pause != 0) {
SetWaypointPause();
if(GetAppearance() != eaStanding)
SetAppearance(eaStanding, false);
SetMoving(false);
if (m_CurrentWayPoint.w >= 0.0) {
SetHeading(m_CurrentWayPoint.w);
}
SendPosition();
}
SendPosition();
//kick off event_waypoint arrive
char temp[16];