mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 09:07:19 +00:00
greatly improve performance
This commit is contained in:
@@ -113,8 +113,8 @@ Unit* EnemyPlayerValue::Calculate()
|
||||
continue;
|
||||
|
||||
if (Unit* pAttacker = pMember->getAttackerForHelper())
|
||||
if (bot->IsWithinDist(pAttacker, maxAggroDistance * 2.0f) && bot->IsWithinLOSInMap(pAttacker) && pAttacker != pVictim
|
||||
&& pAttacker->CanSeeOrDetect(bot) && pAttacker->IsPlayer())
|
||||
if (pAttacker->IsPlayer() && bot->IsWithinDist(pAttacker, maxAggroDistance * 2.0f) && bot->IsWithinLOSInMap(pAttacker) && pAttacker != pVictim
|
||||
&& pAttacker->CanSeeOrDetect(bot))
|
||||
return pAttacker;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user