From e7c220d84378fdfc5b9e08d86a9b4f1d28b1571f Mon Sep 17 00:00:00 2001 From: megamage Date: Sun, 28 Dec 2008 10:01:05 -0600 Subject: *Reset currentNode in waypoint generator initialize. By trullyone. --HG-- branch : trunk --- src/game/WaypointMovementGenerator.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/game/WaypointMovementGenerator.cpp') diff --git a/src/game/WaypointMovementGenerator.cpp b/src/game/WaypointMovementGenerator.cpp index 8786d25549e..f962c242bff 100644 --- a/src/game/WaypointMovementGenerator.cpp +++ b/src/game/WaypointMovementGenerator.cpp @@ -94,6 +94,8 @@ template<> void WaypointMovementGenerator::Initialize(Creature &u) { + i_currentNode = 0; + StopedByPlayer = false; u.StopMoving(); if(!path_id) path_id = u.GetWaypointPath(); -- cgit v1.2.3 From 9fa37dc69344a28a585bc2dee6713d7ebaa03d28 Mon Sep 17 00:00:00 2001 From: megamage Date: Sun, 28 Dec 2008 10:31:52 -0600 Subject: *Update waypoint Initialize(). --HG-- branch : trunk --- src/game/WaypointMovementGenerator.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/game/WaypointMovementGenerator.cpp') diff --git a/src/game/WaypointMovementGenerator.cpp b/src/game/WaypointMovementGenerator.cpp index f962c242bff..589afa088c3 100644 --- a/src/game/WaypointMovementGenerator.cpp +++ b/src/game/WaypointMovementGenerator.cpp @@ -94,12 +94,14 @@ template<> void WaypointMovementGenerator::Initialize(Creature &u) { - i_currentNode = 0; + u.StopMoving(); + i_currentNode = -1; // uint32, become 0 in the first update + i_nextMoveTime.Reset(0); StopedByPlayer = false; - u.StopMoving(); - if(!path_id) - path_id = u.GetWaypointPath(); - waypoints = WaypointMgr.GetPath(path_id); + if(!path_id) + path_id = u.GetWaypointPath(); + /*i_currentNode = 0; + waypoints = WaypointMgr.GetPath(path_id); if(waypoints && waypoints->size()) { Traveller traveller(u); @@ -107,7 +109,7 @@ WaypointMovementGenerator::Initialize(Creature &u) InitTraveller(u,node); i_destinationHolder.SetDestination(traveller, node.x, node.y, node.z); i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime()); - } + }*/ } template<> -- cgit v1.2.3