Fix AI not repairing buildings if struck by support powers.
This commit is contained in:
1
AUTHORS
1
AUTHORS
@@ -76,6 +76,7 @@ Also thanks to:
|
||||
* Rikhardur Bjarni Einarsson (WolfGaming)
|
||||
* Sascha Biedermann (bidifx)
|
||||
* Sebastien Kerguen (xanax)
|
||||
* Shawn Collins (UberWaffe)
|
||||
* Simon Verbeke (Saticmotion)
|
||||
* Taryn Hill (Phrohdoh)
|
||||
* Teemu Nieminen (Temeez)
|
||||
|
||||
@@ -785,11 +785,7 @@ namespace OpenRA.Mods.RA.AI
|
||||
|
||||
public void Damaged(Actor self, AttackInfo e)
|
||||
{
|
||||
// TODO: Surely we want to do this even if their destroyer died?
|
||||
if (!enabled || e.Attacker.Destroyed)
|
||||
return;
|
||||
|
||||
if (!e.Attacker.HasTrait<ITargetable>())
|
||||
if (!enabled)
|
||||
return;
|
||||
|
||||
var rb = self.TraitOrDefault<RepairableBuilding>();
|
||||
@@ -805,6 +801,12 @@ namespace OpenRA.Mods.RA.AI
|
||||
}
|
||||
}
|
||||
|
||||
if (e.Attacker.Destroyed)
|
||||
return;
|
||||
|
||||
if (!e.Attacker.HasTrait<ITargetable>())
|
||||
return;
|
||||
|
||||
if (e.Attacker != null && e.Damage > 0)
|
||||
aggro[e.Attacker.Owner].Aggro += e.Damage;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user