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:
@@ -69,7 +69,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
else
|
||||
{
|
||||
var damage = health.MaxHP * capturesInfo.SabotageHPRemoval / 100;
|
||||
actor.InflictDamage(self, damage, null);
|
||||
actor.InflictDamage(self, new Damage(damage));
|
||||
}
|
||||
|
||||
self.Dispose();
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
return this;
|
||||
}
|
||||
|
||||
self.InflictDamage(self, -hpToRepair, null);
|
||||
self.InflictDamage(self, new Damage(-hpToRepair));
|
||||
|
||||
foreach (var depot in host.TraitsImplementing<INotifyRepair>())
|
||||
depot.Repairing(host, self);
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
if (health.DamageState == DamageState.Undamaged)
|
||||
return;
|
||||
|
||||
target.InflictDamage(self, -health.MaxHP, null);
|
||||
target.InflictDamage(self, new Damage(-health.MaxHP));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user