*Update waypoint Initialize().
--HG-- branch : trunk
This commit is contained in:
@@ -94,12 +94,14 @@ template<>
|
|||||||
void
|
void
|
||||||
WaypointMovementGenerator<Creature>::Initialize(Creature &u)
|
WaypointMovementGenerator<Creature>::Initialize(Creature &u)
|
||||||
{
|
{
|
||||||
i_currentNode = 0;
|
u.StopMoving();
|
||||||
|
i_currentNode = -1; // uint32, become 0 in the first update
|
||||||
|
i_nextMoveTime.Reset(0);
|
||||||
StopedByPlayer = false;
|
StopedByPlayer = false;
|
||||||
u.StopMoving();
|
if(!path_id)
|
||||||
if(!path_id)
|
path_id = u.GetWaypointPath();
|
||||||
path_id = u.GetWaypointPath();
|
/*i_currentNode = 0;
|
||||||
waypoints = WaypointMgr.GetPath(path_id);
|
waypoints = WaypointMgr.GetPath(path_id);
|
||||||
if(waypoints && waypoints->size())
|
if(waypoints && waypoints->size())
|
||||||
{
|
{
|
||||||
Traveller<Creature> traveller(u);
|
Traveller<Creature> traveller(u);
|
||||||
@@ -107,7 +109,7 @@ WaypointMovementGenerator<Creature>::Initialize(Creature &u)
|
|||||||
InitTraveller(u,node);
|
InitTraveller(u,node);
|
||||||
i_destinationHolder.SetDestination(traveller, node.x, node.y, node.z);
|
i_destinationHolder.SetDestination(traveller, node.x, node.y, node.z);
|
||||||
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
|
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
|
|||||||
Reference in New Issue
Block a user