Remove passing the warheads from DamageWarhead to AttackInfo.
Added a Damage class to pass damage value and damage(types) instead. This removes a great amount of overhead and longterm opens possibilities to have damagetypes without warheads.
This commit is contained in:
@@ -72,8 +72,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (self.World.SharedRandom.Next(100) > info.Probability)
|
||||
return;
|
||||
|
||||
var warhead = e.Warhead as DamageWarhead;
|
||||
if (info.DeathType != null && (warhead == null || !warhead.DamageTypes.Contains(info.DeathType)))
|
||||
if (info.DeathType != null && !e.Damage.DamageTypes.Contains(info.DeathType))
|
||||
return;
|
||||
|
||||
self.World.AddFrameEndTask(w =>
|
||||
|
||||
Reference in New Issue
Block a user