mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 05:06:24 +00:00
fix(Core/SmartAI): add prevent almost infinite spinning of mutual target to pets (#19090)
fix(Core/SmartAI)petspin
This commit is contained in:
@@ -108,6 +108,14 @@ bool ChaseMovementGenerator<T>::DoUpdate(T* owner, uint32 time_diff)
|
||||
mutualChase = true;
|
||||
}
|
||||
|
||||
// Prevent almost infinite spinning for pets with mutualTarget
|
||||
// _mutualChase is false for previous check
|
||||
if (angle && !mutualChase && !_mutualChase && mutualTarget && chaseRange < meleeRange && cOwner && cOwner->IsPet())
|
||||
{
|
||||
angle = Optional<ChaseAngle>();
|
||||
mutualChase = true;
|
||||
}
|
||||
|
||||
// periodically check if we're already in the expected range...
|
||||
i_recheckDistance.Update(time_diff);
|
||||
if (i_recheckDistance.Passed())
|
||||
|
||||
Reference in New Issue
Block a user