Get rid of unit pathing delay completely
This commit is contained in:
@@ -198,12 +198,6 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
|
|
||||||
if (path == null)
|
if (path == null)
|
||||||
{
|
{
|
||||||
if (mobile.TicksBeforePathing > 0)
|
|
||||||
{
|
|
||||||
--mobile.TicksBeforePathing;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
path = EvalPath();
|
path = EvalPath();
|
||||||
SanityCheckPath(mobile);
|
SanityCheckPath(mobile);
|
||||||
}
|
}
|
||||||
@@ -315,12 +309,6 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
if (--waitTicksRemaining >= 0)
|
if (--waitTicksRemaining >= 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (mobile.TicksBeforePathing > 0)
|
|
||||||
{
|
|
||||||
--mobile.TicksBeforePathing;
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Calculate a new path
|
// Calculate a new path
|
||||||
mobile.RemoveInfluence();
|
mobile.RemoveInfluence();
|
||||||
var newPath = EvalPath();
|
var newPath = EvalPath();
|
||||||
|
|||||||
@@ -91,10 +91,6 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
public class Mobile : ConditionalTrait<MobileInfo>, INotifyCreated, IIssueOrder, IResolveOrder, IOrderVoice, IPositionable, IMove,
|
public class Mobile : ConditionalTrait<MobileInfo>, INotifyCreated, IIssueOrder, IResolveOrder, IOrderVoice, IPositionable, IMove,
|
||||||
IFacing, IDeathActorInitModifier, INotifyAddedToWorld, INotifyRemovedFromWorld, INotifyBlockingMove, IActorPreviewInitModifier, INotifyBecomingIdle
|
IFacing, IDeathActorInitModifier, INotifyAddedToWorld, INotifyRemovedFromWorld, INotifyBlockingMove, IActorPreviewInitModifier, INotifyBecomingIdle
|
||||||
{
|
{
|
||||||
const int AverageTicksBeforePathing = 5;
|
|
||||||
const int SpreadTicksBeforePathing = 5;
|
|
||||||
internal int TicksBeforePathing = 0;
|
|
||||||
|
|
||||||
readonly Actor self;
|
readonly Actor self;
|
||||||
readonly Lazy<IEnumerable<int>> speedModifiers;
|
readonly Lazy<IEnumerable<int>> speedModifiers;
|
||||||
|
|
||||||
@@ -643,8 +639,6 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
if (!order.Queued)
|
if (!order.Queued)
|
||||||
self.CancelActivity();
|
self.CancelActivity();
|
||||||
|
|
||||||
TicksBeforePathing = AverageTicksBeforePathing + self.World.SharedRandom.Next(-SpreadTicksBeforePathing, SpreadTicksBeforePathing);
|
|
||||||
|
|
||||||
self.SetTargetLine(Target.FromCell(self.World, loc), Color.Green);
|
self.SetTargetLine(Target.FromCell(self.World, loc), Color.Green);
|
||||||
self.QueueActivity(order.Queued, new Move(self, loc, WDist.FromCells(8), null, true));
|
self.QueueActivity(order.Queued, new Move(self, loc, WDist.FromCells(8), null, true));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user