From c1e6e3f9b95cd745d25c791fd68eb7e0cafc041e Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Fri, 23 Dec 2011 16:41:29 +1300 Subject: [PATCH] don't announce self-damage --- OpenRA.Mods.RA/Player/BaseAttackNotifier.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenRA.Mods.RA/Player/BaseAttackNotifier.cs b/OpenRA.Mods.RA/Player/BaseAttackNotifier.cs index 7c53fa5466..7def1b2376 100644 --- a/OpenRA.Mods.RA/Player/BaseAttackNotifier.cs +++ b/OpenRA.Mods.RA/Player/BaseAttackNotifier.cs @@ -38,6 +38,10 @@ namespace OpenRA.Mods.RA if (!self.HasTrait()) return; + /* don't track self-damage */ + if (e.Attacker != null && e.Attacker.Owner == self.Owner) + return; + if (self.World.FrameNumber - lastAttackTime > info.NotifyInterval * 25) Sound.PlayToPlayer(self.Owner, info.Audio);