Make INotifyDamage require explicit implementation

This commit is contained in:
reaperrr
2018-04-29 04:45:37 +02:00
committed by Paul Chote
parent ccd070afd6
commit 7ca9aa5e0b
7 changed files with 7 additions and 6 deletions

View File

@@ -50,7 +50,7 @@ namespace OpenRA.Mods.Common.Traits
lastAttackTime = -info.NotifyInterval * 25;
}
public void Damaged(Actor self, AttackInfo e)
void INotifyDamage.Damaged(Actor self, AttackInfo e)
{
if (e.Attacker == null)
return;

View File

@@ -46,7 +46,7 @@ namespace OpenRA.Mods.Common.Traits
lastAttackTime = -info.NotifyInterval * 25;
}
public void Damaged(Actor self, AttackInfo e)
void INotifyDamage.Damaged(Actor self, AttackInfo e)
{
// Don't track self-damage
if (e.Attacker != null && e.Attacker.Owner == self.Owner)

View File

@@ -53,7 +53,7 @@ namespace OpenRA.Mods.Common.Traits.Render
rs.Add(new AnimationWithOffset(anim, null, () => !isSmoking));
}
public void Damaged(Actor self, AttackInfo e)
void INotifyDamage.Damaged(Actor self, AttackInfo e)
{
if (info.DamageTypes.Count > 0 && !e.Damage.DamageTypes.Overlaps(info.DamageTypes))
return;

View File

@@ -74,7 +74,7 @@ namespace OpenRA.Mods.Common.Traits
}
}
public void Damaged(Actor self, AttackInfo e)
void INotifyDamage.Damaged(Actor self, AttackInfo e)
{
if (e.Damage.Value > 0)
damageTicks = Info.DamageCooldown;