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

@@ -120,13 +120,13 @@ namespace OpenRA.Mods.Common.Traits
{
var cells = buildingInfo.OccupiedTiles(self.Location);
foreach (var c in cells)
weapon.Impact(Target.FromPos(self.World.Map.CenterOfCell(c)), source, Enumerable.Empty<int>());
weapon.Impact(Target.FromPos(self.World.Map.CenterOfCell(c)), source);
return;
}
// Use .FromPos since this actor is killed. Cannot use Target.FromActor
weapon.Impact(Target.FromPos(self.CenterPosition), source, Enumerable.Empty<int>());
weapon.Impact(Target.FromPos(self.CenterPosition), source);
}
WeaponInfo ChooseWeaponForExplosion(Actor self)