Calling PreparingAttack before calculating Muzzle.
This commit is contained in:
@@ -275,6 +275,9 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
protected virtual void FireBarrel(Actor self, IFacing facing, Target target, Barrel barrel)
|
protected virtual void FireBarrel(Actor self, IFacing facing, Target target, Barrel barrel)
|
||||||
{
|
{
|
||||||
|
foreach (var na in notifyAttacks)
|
||||||
|
na.PreparingAttack(self, target, this, barrel);
|
||||||
|
|
||||||
Func<WPos> muzzlePosition = () => self.CenterPosition + MuzzleOffset(self, barrel);
|
Func<WPos> muzzlePosition = () => self.CenterPosition + MuzzleOffset(self, barrel);
|
||||||
var legacyFacing = MuzzleOrientation(self, barrel).Yaw.Angle / 4;
|
var legacyFacing = MuzzleOrientation(self, barrel).Yaw.Angle / 4;
|
||||||
Func<int> legacyMuzzleFacing = () => MuzzleOrientation(self, barrel).Yaw.Angle / 4;
|
Func<int> legacyMuzzleFacing = () => MuzzleOrientation(self, barrel).Yaw.Angle / 4;
|
||||||
@@ -315,9 +318,6 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
GuidedTarget = target
|
GuidedTarget = target
|
||||||
};
|
};
|
||||||
|
|
||||||
foreach (var na in notifyAttacks)
|
|
||||||
na.PreparingAttack(self, target, this, barrel);
|
|
||||||
|
|
||||||
ScheduleDelayedAction(Info.FireDelay, () =>
|
ScheduleDelayedAction(Info.FireDelay, () =>
|
||||||
{
|
{
|
||||||
if (args.Weapon.Projectile != null)
|
if (args.Weapon.Projectile != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user