Revert TicksBeforePathing move from Mobile to Move.

This partially reverts commit 11c8cda0c38ad0ac71c58557d34480925307cebd.
This commit is contained in:
Paul Chote
2017-08-11 21:08:25 +01:00
committed by reaperrr
parent 6e8dd5058e
commit 4e493f265f
2 changed files with 10 additions and 10 deletions

View File

@@ -390,6 +390,10 @@ namespace OpenRA.Mods.Common.Traits
public class Mobile : ConditionalTrait<MobileInfo>, INotifyCreated, IIssueOrder, IResolveOrder, IOrderVoice, IPositionable, IMove,
IFacing, IDeathActorInitModifier, INotifyAddedToWorld, INotifyRemovedFromWorld, INotifyBlockingMove, IActorPreviewInitModifier, INotifyBecomingIdle
{
const int AverageTicksBeforePathing = 5;
const int SpreadTicksBeforePathing = 5;
internal int TicksBeforePathing = 0;
readonly Actor self;
readonly Lazy<IEnumerable<int>> speedModifiers;
public bool IsMoving { get; set; }
@@ -628,6 +632,8 @@ namespace OpenRA.Mods.Common.Traits
if (!order.Queued)
self.CancelActivity();
TicksBeforePathing = AverageTicksBeforePathing + self.World.SharedRandom.Next(-SpreadTicksBeforePathing, SpreadTicksBeforePathing);
self.SetTargetLine(Target.FromCell(self.World, order.TargetLocation), Color.Green);
self.QueueActivity(order.Queued, new Move(self, order.TargetLocation, WDist.FromCells(8), null, true));
}