Merge pull request #11391 from Nawuko/waypoint-fix

Core/Waypoints: Revert partly f1a82a578b t...
This commit is contained in:
Shauren
2013-12-31 10:43:41 -08:00
2 changed files with 2 additions and 3 deletions

View File

@@ -193,8 +193,7 @@ bool WaypointMovementGenerator<Creature>::DoUpdate(Creature* creature, uint32 di
{
if (creature->IsStopped())
Stop(STOP_TIME_FOR_PLAYER);
// Checking just before reaching waypoint gives smother movement than using FinalDestination
else if (creature->movespline->timeElapsed() < 150)
else if (creature->movespline->Finalized())
{
OnArrived(creature);
return StartMove(creature);

View File

@@ -79,10 +79,10 @@ namespace Movement
UpdateResult _updateState(int32& ms_time_diff);
int32 next_timestamp() const { return spline.length(point_Idx + 1); }
int32 segment_time_elapsed() const { return next_timestamp() - time_passed; }
int32 timeElapsed() const { return Duration() - time_passed; }
int32 timePassed() const { return time_passed; }
public:
int32 timeElapsed() const { return Duration() - time_passed; }
int32 Duration() const { return spline.length(); }
MySpline const& _Spline() const { return spline; }
int32 _currentSplineIdx() const { return point_Idx; }