RA - AppearsFriendlyTo and AppearsHostileTo actor extensions

This commit is contained in:
alzeih
2011-03-13 15:37:24 +13:00
parent cf8cfdc42d
commit f4e4f987be
6 changed files with 56 additions and 4 deletions

View File

@@ -31,7 +31,7 @@ namespace OpenRA.Mods.RA
if (!attack.HasAnyValidWeapons(Target.FromActor(e.Attacker))) return;
// don't retaliate against own units force-firing on us. it's usually not what the player wanted.
if (self.Owner.Stances[e.Attacker.Owner] == Stance.Ally) return;
if (e.Attacker.AppearsFriendlyTo(self)) return;
if (e.Damage < 0) return; // don't retaliate against healers