Fix Armament not working properly with value 0 in BurstDelays

This commit is contained in:
Gustas
2023-02-17 20:49:25 +02:00
committed by Matthias Mailänder
parent b7e0ed9b87
commit 4dec79a5fb
6 changed files with 24 additions and 34 deletions

View File

@@ -85,15 +85,7 @@ namespace OpenRA.Mods.D2k.Activities
if (affectedPlayers.Contains(self.World.LocalPlayer))
TextNotificationsManager.AddTransientLine(self.World.LocalPlayer, swallow.Info.WormAttackTextNotification);
var barrel = armament.CheckFire(self, facing, target);
if (barrel == null)
return false;
// armament.CheckFire already calls INotifyAttack.PreparingAttack
foreach (var notify in self.TraitsImplementing<INotifyAttack>())
notify.Attacking(self, target, armament, barrel);
return true;
return armament.CheckFire(self, facing, target, true);
}
public override bool Tick(Actor self)