Add DamageTypes to Kill() and make some traits use it.

This commit is contained in:
Mustafa Alperen Seki
2018-02-03 11:07:02 +03:00
committed by reaperrr
parent b620e8107f
commit 5e7e3bb011
17 changed files with 58 additions and 22 deletions

View File

@@ -321,12 +321,12 @@ namespace OpenRA
health.InflictDamage(this, attacker, damage, false);
}
public void Kill(Actor attacker)
public void Kill(Actor attacker, HashSet<string> damageTypes = null)
{
if (Disposed || health == null)
return;
health.Kill(this, attacker);
health.Kill(this, attacker, damageTypes);
}
public bool CanBeViewedByPlayer(Player player)

View File

@@ -42,7 +42,7 @@ namespace OpenRA.Traits
bool IsDead { get; }
void InflictDamage(Actor self, Actor attacker, Damage damage, bool ignoreModifiers);
void Kill(Actor self, Actor attacker);
void Kill(Actor self, Actor attacker, HashSet<string> damageTypes);
}
// depends on the order of pips in WorldRenderer.cs!