Fixes waypoints: No pause between every waypoint. This makes waypoints a bit smoother.
--HG-- branch : trunk
This commit is contained in:
1 parent
a7ebcc91cf
commit
89aebd40c9
3 files changed
+4
-1
No files matched your search
@@ -155,7 +155,7 @@ WaypointMovementGenerator<Creature>::Update(Creature &unit, const uint32 &diff)
|
||||
i_nextMoveTime.Update(diff);
|
||||
i_destinationHolder.UpdateTraveller(traveller, diff, true);
|
||||
|
||||
if (i_nextMoveTime.Passed())
|
||||
if (i_nextMoveTime.GetExpiry() < TIMEDIFF_NEXT_WP)
|
||||
{
|
||||
if (unit.IsStopped())
|
||||
{
|
||||
@@ -202,6 +202,7 @@ WaypointMovementGenerator<Creature>::Update(Creature &unit, const uint32 &diff)
|
||||
if (node->event_id && urand(0,99) < node->event_chance)
|
||||
unit.GetMap()->ScriptsStart(sWaypointScripts, node->event_id, &unit, NULL/*, false*/);
|
||||
|
||||
i_destinationHolder.ResetTravelTime();
|
||||
MovementInform(unit);
|
||||
unit.UpdateWaypointID(i_currentNode);
|
||||
unit.clearUnitState(UNIT_STAT_ROAMING);
|
||||
|
||||
Reference in new issue
Block a user