forked from 0ad/0ad
Make formations respond as one to threats.
Improves their functioning significantly. Based on a patch by @lyv Differential revision: https://code.wildfiregames.com/D4666 Reviewed by: @marder Comments by: @Stan This was SVN commit r26956.
This commit is contained in:
parent
01fd2564e5
commit
774e8060d9
@ -5044,6 +5044,9 @@ UnitAI.prototype.RespondToTargetedEntities = function(ents)
|
||||
if (!ents.length)
|
||||
return false;
|
||||
|
||||
if (this.IsFormationMember())
|
||||
return Engine.QueryInterface(this.GetFormationController(), IID_UnitAI).RespondToTargetedEntities(ents);
|
||||
|
||||
if (this.GetStance().respondChase)
|
||||
return this.AttackVisibleEntity(ents);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user