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:
@@ -292,7 +292,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
KillUnitsOnBridge();
|
||||
}
|
||||
else
|
||||
health.InflictDamage(self, repairer, -health.MaxHP, null, true);
|
||||
health.InflictDamage(self, repairer, new Damage(-health.MaxHP), true);
|
||||
if (direction < 0 ? neighbours[0] == null && neighbours[1] == null : Hut != null || neighbours[direction] == null)
|
||||
onComplete(); // Done if single or reached other hut
|
||||
});
|
||||
|
||||
@@ -129,7 +129,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
// activePlayers won't cause IndexOutOfRange because we capped the max amount of players
|
||||
// to the length of the array
|
||||
self.InflictDamage(self, -(hpToRepair * Info.RepairBonuses[activePlayers - 1] / 100), null);
|
||||
self.InflictDamage(self, new Damage(-(hpToRepair * Info.RepairBonuses[activePlayers - 1] / 100)));
|
||||
|
||||
if (health.DamageState == DamageState.Undamaged)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user