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:
@@ -52,7 +52,7 @@ namespace OpenRA.Mods.Common.Warheads
|
||||
|
||||
// Damage is measured as a percentage of the target health
|
||||
var damage = Util.ApplyPercentageModifiers(healthInfo.HP, damageModifiers.Append(Damage, DamageVersus(victim)));
|
||||
victim.InflictDamage(firedBy, damage, this);
|
||||
victim.InflictDamage(firedBy, new Damage(damage, DamageTypes));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user