Make all warheads use WarheadArgs

Instead of passing damageModifiers directly.
This commit is contained in:
reaperrr
2020-05-01 00:54:58 +02:00
committed by Pavel Penev
parent 38cdc93010
commit 2b4035979b
5 changed files with 31 additions and 14 deletions

View File

@@ -50,6 +50,16 @@ namespace OpenRA.GameRules
WeaponTarget = args.GuidedTarget;
}
// For places that only want to update some of the fields (usually DamageModifiers)
public WarheadArgs(WarheadArgs args)
{
Weapon = args.Weapon;
DamageModifiers = args.DamageModifiers;
Source = args.Source;
SourceActor = args.SourceActor;
WeaponTarget = args.WeaponTarget;
}
// Default empty constructor for callers that want to initialize fields themselves
public WarheadArgs() { }
}