Fix yaks trying to attack invalid targets

This commit is contained in:
abcdefg30
2016-10-04 10:04:59 +02:00
parent 5d2a6ff2e7
commit 47968aabdc
4 changed files with 14 additions and 18 deletions

View File

@@ -75,7 +75,7 @@ end
Yak = nil
YakAttack = function(yak)
local targets = Map.ActorsInCircle(YakAttackPoint.CenterPosition, WDist.FromCells(10), function(a)
return a.Owner == allies1 and not a.IsDead and a ~= Einstein and a ~= Tanya and a ~= Engineer
return a.Owner == allies1 and not a.IsDead and a ~= Einstein and a ~= Tanya and a ~= Engineer and yak.CanTarget(a)
end)
if (#targets > 0) then