Movement/WaypointGenerator: Fix issue where waypoints with delay always would turn to 0.0 orientation

This commit is contained in:
kaelima
2012-05-07 14:33:24 +02:00
parent 5a291149c1
commit 7be70393e5
@@ -107,7 +107,7 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature &creature)
i_currentNode = (i_currentNode+1) % i_path->size();
}
const WaypointData *node = i_path->at(i_currentNode);
WaypointData const* node = i_path->at(i_currentNode);
m_isArrivalDone = false;
@@ -116,7 +116,8 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature &creature)
Movement::MoveSplineInit init(creature);
init.MoveTo(node->x, node->y, node->z);
if (node->orientation != 100 && node->delay != 0)
//! Accepts angles such as 0.00001 and -0.00001, 0 must be ignored, default value in waypoint table
if (node->orientation && node->delay)
init.SetFacing(node->orientation);
init.SetWalk(!node->run);