Introduce WarheadArgs

- Passes additional arguments to warheads on impact
- Uses that to reduce parameter count of DoImpact by 1
This commit is contained in:
reaperrr
2019-05-12 23:29:35 +02:00
committed by teinarss
parent fdc0a6e2b9
commit 6220d7e62e
31 changed files with 127 additions and 44 deletions

View File

@@ -217,7 +217,7 @@ namespace OpenRA.Mods.Cnc.Traits
if (mad.info.ThumpDamageWeapon != null)
{
// Use .FromPos since this weapon needs to affect more than just the MadTank actor
mad.info.ThumpDamageWeaponInfo.Impact(Target.FromPos(self.CenterPosition), self, Enumerable.Empty<int>());
mad.info.ThumpDamageWeaponInfo.Impact(Target.FromPos(self.CenterPosition), self);
}
screenShaker.AddEffect(mad.info.ThumpShakeTime, self.CenterPosition, mad.info.ThumpShakeIntensity, mad.info.ThumpShakeMultiplier);
@@ -241,7 +241,7 @@ namespace OpenRA.Mods.Cnc.Traits
if (mad.info.DetonationWeapon != null)
{
// Use .FromPos since this actor is killed. Cannot use Target.FromActor
mad.info.DetonationWeaponInfo.Impact(Target.FromPos(self.CenterPosition), self, Enumerable.Empty<int>());
mad.info.DetonationWeaponInfo.Impact(Target.FromPos(self.CenterPosition), self);
}
self.Kill(self, mad.info.DamageTypes);