mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-14 09:29:09 +00:00
greatly improve performance
This commit is contained in:
@@ -13,7 +13,7 @@ GuidVector NearestUnitsValue::Calculate()
|
||||
GuidVector results;
|
||||
for (Unit* unit : targets)
|
||||
{
|
||||
if ((ignoreLos || bot->IsWithinLOSInMap(unit)) && AcceptUnit(unit))
|
||||
if (AcceptUnit(unit) && (ignoreLos || bot->IsWithinLOSInMap(unit)))
|
||||
results.push_back(unit->GetGUID());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user