mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
fix(Core/Movement): remove unecessary reset() (#20419)
Co-authored-by: Ovahlord <18347559+ovahlord@users.noreply.github.com>
This commit is contained in:
@@ -241,8 +241,6 @@ void RandomMovementGenerator<Creature>::DoInitialize(Creature* creature)
|
||||
if (!_wanderDistance)
|
||||
_wanderDistance = creature->GetWanderDistance();
|
||||
|
||||
_pathGenerator.reset();
|
||||
|
||||
_nextMoveTime.Reset(creature->GetSpawnId() && creature->GetWanderDistance() == _wanderDistance ? urand(1, 5000) : 0);
|
||||
_wanderDistance = std::max((creature->GetWanderDistance() == _wanderDistance && creature->GetInstanceId() == 0) ? (creature->CanFly() ? MIN_WANDER_DISTANCE_AIR : MIN_WANDER_DISTANCE_GROUND) : 0.0f, _wanderDistance);
|
||||
|
||||
@@ -281,7 +279,6 @@ bool RandomMovementGenerator<Creature>::DoUpdate(Creature* creature, const uint3
|
||||
{
|
||||
_nextMoveTime.Reset(0); // Expire the timer
|
||||
creature->StopMoving();
|
||||
_pathGenerator.reset();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user