diff --git a/OpenRA.Mods.Common/Activities/UndeployForGrantedCondition.cs b/OpenRA.Mods.Common/Activities/UndeployForGrantedCondition.cs index 07c0c74379..9f87d16e81 100644 --- a/OpenRA.Mods.Common/Activities/UndeployForGrantedCondition.cs +++ b/OpenRA.Mods.Common/Activities/UndeployForGrantedCondition.cs @@ -24,24 +24,8 @@ namespace OpenRA.Mods.Common.Activities this.deploy = deploy; } - protected override void OnFirstRun(Actor self) - { - var tInfo = self.Info.TraitInfoOrDefault(); - if (tInfo != null) - QueueChild(new WaitForTurretAlignment(self, tInfo.InitialFacing)); - } - public override Activity Tick(Actor self) { - if (ChildActivity != null) - { - ActivityUtils.RunActivity(self, ChildActivity); - return this; - } - - if (IsCanceled) - return NextActivity; - IsInterruptible = false; // must DEPLOY from now. deploy.Undeploy(); diff --git a/OpenRA.Mods.Common/Activities/WaitForTurretAlignment.cs b/OpenRA.Mods.Common/Activities/WaitForTurretAlignment.cs deleted file mode 100644 index 03caa419ff..0000000000 --- a/OpenRA.Mods.Common/Activities/WaitForTurretAlignment.cs +++ /dev/null @@ -1,41 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2018 The OpenRA Developers (see AUTHORS) - * This file is part of OpenRA, which is free software. It is made - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 3 of - * the License, or (at your option) any later version. For more - * information, see COPYING. - */ -#endregion - -using OpenRA.Activities; -using OpenRA.Mods.Common.Traits; - -namespace OpenRA.Mods.Common.Activities -{ - public class WaitForTurretAlignment : Activity - { - readonly Turreted turreted; - readonly int desiredAlignment; - - public WaitForTurretAlignment(Actor self, int desiredAlignment) - { - this.turreted = self.Trait(); - this.desiredAlignment = desiredAlignment; - } - - protected override void OnFirstRun(Actor self) - { - turreted.StopAiming(self); - } - - public override Activity Tick(Actor self) - { - turreted.DesiredFacing = desiredAlignment; - if (turreted.HasAchievedDesiredFacing) - return NextActivity; - return this; - } - } -} diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index 12122fdce1..a91a1241f1 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -118,7 +118,6 @@ - diff --git a/OpenRA.Mods.Common/Traits/Turreted.cs b/OpenRA.Mods.Common/Traits/Turreted.cs index d838a99f5d..595ff0c041 100644 --- a/OpenRA.Mods.Common/Traits/Turreted.cs +++ b/OpenRA.Mods.Common/Traits/Turreted.cs @@ -188,15 +188,6 @@ namespace OpenRA.Mods.Common.Traits return HasAchievedDesiredFacing; } - public void StopAiming(Actor self) - { - if (IsTraitDisabled) - return; - - if (attack != null && attack.IsAiming) - attack.OnStopOrder(self); - } - public virtual bool HasAchievedDesiredFacing { get { return DesiredFacing == null || TurretFacing == DesiredFacing.Value; }