diff options
| author | Liberate <none@none> | 2010-05-24 20:16:09 +0200 |
|---|---|---|
| committer | Liberate <none@none> | 2010-05-24 20:16:09 +0200 |
| commit | 89aebd40c9545b306955a662f0bf3766e2a2c10b (patch) | |
| tree | 476eacc9880074637260801ff9e23b27d73049d7 /src/game/WaypointMovementGenerator.cpp | |
| parent | a7ebcc91cf030e19c51677e34ecf79c8c9e55376 (diff) | |
Fixes waypoints: No pause between every waypoint. This makes waypoints a bit smoother.
--HG--
branch : trunk
Diffstat (limited to 'src/game/WaypointMovementGenerator.cpp')
| -rw-r--r-- | src/game/WaypointMovementGenerator.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/WaypointMovementGenerator.cpp b/src/game/WaypointMovementGenerator.cpp index d2e4c515a04..2a0c7c0253d 100644 --- a/src/game/WaypointMovementGenerator.cpp +++ b/src/game/WaypointMovementGenerator.cpp @@ -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); |
