Pass DamageTypes in Explodes

This commit is contained in:
abcdefg30
2019-12-24 11:40:28 +01:00
committed by teinarss
parent 7d887f0332
commit baa50c9c53

View File

@@ -155,7 +155,7 @@ namespace OpenRA.Mods.Common.Traits
// Cast to long to avoid overflow when multiplying by the health // Cast to long to avoid overflow when multiplying by the health
var source = Info.DamageSource == DamageSource.Self ? self : e.Attacker; var source = Info.DamageSource == DamageSource.Self ? self : e.Attacker;
if (health.HP * 100L < Info.DamageThreshold * (long)health.MaxHP) if (health.HP * 100L < Info.DamageThreshold * (long)health.MaxHP)
self.World.AddFrameEndTask(w => self.Kill(source)); self.World.AddFrameEndTask(w => self.Kill(source, e.Damage.DamageTypes));
} }
} }
} }