fix(Core/Movement): Fix creatures not resuming movement after being talked to (#20945)
Fix creatures not resuming movement after being talked to
This commit is contained in:
@@ -239,10 +239,6 @@ bool WaypointMovementGenerator<Creature>::DoUpdate(Creature* creature, uint32 di
|
||||
return StartMove(creature);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (creature->IsStopped())
|
||||
Stop(sWorld->getIntConfig(CONFIG_WAYPOINT_MOVEMENT_STOP_TIME_FOR_PLAYER) * IN_MILLISECONDS);
|
||||
else
|
||||
{
|
||||
bool finished = creature->movespline->Finalized();
|
||||
// xinef: code to detect pre-empetively if we should start movement to next waypoint
|
||||
@@ -256,7 +252,6 @@ bool WaypointMovementGenerator<Creature>::DoUpdate(Creature* creature, uint32 di
|
||||
return StartMove(creature);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -287,10 +282,16 @@ void WaypointMovementGenerator<Creature>::MovementInform(Creature* creature)
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointMovementGenerator<Creature>::Pause(uint32 /*timer*/)
|
||||
void WaypointMovementGenerator<Creature>::Pause(uint32 timer)
|
||||
{
|
||||
if (timer)
|
||||
i_nextMoveTime.Reset(timer);
|
||||
else
|
||||
{
|
||||
// No timer? Will be paused forever until ::Resume is called
|
||||
stalled = true;
|
||||
i_nextMoveTime.Reset(1);
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointMovementGenerator<Creature>::Resume(uint32 /*overrideTimer/*/)
|
||||
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
void DoFinalize(Creature*);
|
||||
void DoReset(Creature*);
|
||||
bool DoUpdate(Creature*, uint32 diff);
|
||||
void Pause(uint32 timer/* = 0*/);
|
||||
void Pause(uint32 timer = 0);
|
||||
void Resume(uint32 overrideTimer/* = 0*/);
|
||||
|
||||
void MovementInform(Creature*);
|
||||
|
||||
Reference in New Issue
Block a user