Introduce WarheadArgs
- Passes additional arguments to warheads on impact - Uses that to reduce parameter count of DoImpact by 1
This commit is contained in:
@@ -45,9 +45,18 @@ namespace OpenRA.Mods.Cnc.Effects
|
||||
public void Tick(World world)
|
||||
{
|
||||
anim.Tick();
|
||||
|
||||
if (!impacted && weaponDelay-- <= 0)
|
||||
{
|
||||
weapon.Impact(target, firedBy.PlayerActor, Enumerable.Empty<int>());
|
||||
var warheadArgs = new WarheadArgs
|
||||
{
|
||||
Weapon = weapon,
|
||||
Source = target.CenterPosition,
|
||||
SourceActor = firedBy.PlayerActor,
|
||||
WeaponTarget = target
|
||||
};
|
||||
|
||||
weapon.Impact(target, warheadArgs);
|
||||
impacted = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user