forked from 0ad/0ad
fix attackable players in unitai, refs #2749
This was SVN commit r16656.
This commit is contained in:
parent
4947818c52
commit
6dcf636d7c
@ -5583,9 +5583,9 @@ UnitAI.prototype.CanAttack = function(target, forceResponse)
|
||||
if (cmpCapturable && cmpCapturable.CanCapture(owner) && cmpAttack.GetAttackTypes().indexOf("Capture") != -1)
|
||||
return true;
|
||||
|
||||
if (IsOwnedByEnemyOfPlayer(owner, target) || IsOwnedByNeutralOfPlayer(owner, target))
|
||||
if (IsOwnedByEnemyOfPlayer(owner, target))
|
||||
return true;
|
||||
if (forceResponse && !IsOwnedByPlayer(owner, target))
|
||||
if (forceResponse && !IsOwnedByAllyOfPlayer(owner, target))
|
||||
return true;
|
||||
return false;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user