Introduce INotifyAttack.PreparingAttack
And use it to allow triggering attack animations/overlays at a different point than the actual weapon firing.
This commit is contained in:
@@ -98,12 +98,14 @@ namespace OpenRA.Mods.Common.Traits
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Attacking(Actor self, Target target, Armament a, Barrel barrel)
|
||||
void INotifyAttack.Attacking(Actor self, Target target, Armament a, Barrel barrel)
|
||||
{
|
||||
if (a != null && a.Info.AmmoPoolName == Info.Name)
|
||||
TakeAmmo();
|
||||
}
|
||||
|
||||
void INotifyAttack.PreparingAttack(Actor self, Target target, Armament a, Barrel barrel) { }
|
||||
|
||||
public void Tick(Actor self)
|
||||
{
|
||||
if (!Info.SelfReloads)
|
||||
|
||||
Reference in New Issue
Block a user