Fix Armament not working properly with value 0 in BurstDelays
This commit is contained in:
committed by
Matthias Mailänder
parent
b7e0ed9b87
commit
4dec79a5fb
@@ -78,7 +78,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public class AttackGarrisoned : AttackFollow, INotifyPassengerEntered, INotifyPassengerExited, IRender
|
||||
{
|
||||
public new readonly AttackGarrisonedInfo Info;
|
||||
INotifyAttack[] notifyAttacks;
|
||||
readonly Lazy<BodyOrientation> coords;
|
||||
readonly List<Armament> armaments;
|
||||
readonly List<AnimationWithOffset> muzzles;
|
||||
@@ -98,12 +97,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
paxRender = new Dictionary<Actor, RenderSprites>();
|
||||
}
|
||||
|
||||
protected override void Created(Actor self)
|
||||
{
|
||||
notifyAttacks = self.TraitsImplementing<INotifyAttack>().ToArray();
|
||||
base.Created(self);
|
||||
}
|
||||
|
||||
protected override Func<IEnumerable<Armament>> InitializeGetArmaments(Actor self)
|
||||
{
|
||||
return () => armaments;
|
||||
@@ -171,8 +164,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
paxFacing[a.Actor].Facing = targetYaw;
|
||||
paxPos[a.Actor].SetCenterPosition(a.Actor, pos + PortOffset(self, port));
|
||||
|
||||
var barrel = a.CheckFire(a.Actor, facing, target);
|
||||
if (barrel == null)
|
||||
if (!a.CheckFire(a.Actor, facing, target, true))
|
||||
continue;
|
||||
|
||||
if (a.Info.MuzzleSequence != null)
|
||||
@@ -188,9 +180,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
muzzles.Add(muzzleFlash);
|
||||
muzzleAnim.PlayThen(sequence, () => muzzles.Remove(muzzleFlash));
|
||||
}
|
||||
|
||||
foreach (var npa in notifyAttacks)
|
||||
npa.Attacking(self, target, a, barrel);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user