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)
|
* Rikhardur Bjarni Einarsson (WolfGaming)
|
||||||
* Sascha Biedermann (bidifx)
|
* Sascha Biedermann (bidifx)
|
||||||
* Sebastien Kerguen (xanax)
|
* Sebastien Kerguen (xanax)
|
||||||
|
* Shawn Collins (UberWaffe)
|
||||||
* Simon Verbeke (Saticmotion)
|
* Simon Verbeke (Saticmotion)
|
||||||
* Taryn Hill (Phrohdoh)
|
* Taryn Hill (Phrohdoh)
|
||||||
* Teemu Nieminen (Temeez)
|
* Teemu Nieminen (Temeez)
|
||||||
|
|||||||
@@ -785,11 +785,7 @@ namespace OpenRA.Mods.RA.AI
|
|||||||
|
|
||||||
public void Damaged(Actor self, AttackInfo e)
|
public void Damaged(Actor self, AttackInfo e)
|
||||||
{
|
{
|
||||||
// TODO: Surely we want to do this even if their destroyer died?
|
if (!enabled)
|
||||||
if (!enabled || e.Attacker.Destroyed)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!e.Attacker.HasTrait<ITargetable>())
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var rb = self.TraitOrDefault<RepairableBuilding>();
|
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)
|
if (e.Attacker != null && e.Damage > 0)
|
||||||
aggro[e.Attacker.Owner].Aggro += e.Damage;
|
aggro[e.Attacker.Owner].Aggro += e.Damage;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user