mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-17 22:03:56 -07:00
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
1 changed files with 3 additions and 0 deletions
|
|
@ -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 a new issue