Fix Mobile not sanitizing target location of Move orders
This commit is contained in:
committed by
Paul Chote
parent
62a006ed3e
commit
8f26b4e92b
@@ -626,7 +626,9 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
{
|
{
|
||||||
if (order.OrderString == "Move")
|
if (order.OrderString == "Move")
|
||||||
{
|
{
|
||||||
if (!Info.MoveIntoShroud && !self.Owner.Shroud.IsExplored(order.TargetLocation))
|
var loc = self.World.Map.Clamp(order.TargetLocation);
|
||||||
|
|
||||||
|
if (!Info.MoveIntoShroud && !self.Owner.Shroud.IsExplored(loc))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!order.Queued)
|
if (!order.Queued)
|
||||||
@@ -634,8 +636,8 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
TicksBeforePathing = AverageTicksBeforePathing + self.World.SharedRandom.Next(-SpreadTicksBeforePathing, SpreadTicksBeforePathing);
|
TicksBeforePathing = AverageTicksBeforePathing + self.World.SharedRandom.Next(-SpreadTicksBeforePathing, SpreadTicksBeforePathing);
|
||||||
|
|
||||||
self.SetTargetLine(Target.FromCell(self.World, order.TargetLocation), Color.Green);
|
self.SetTargetLine(Target.FromCell(self.World, loc), Color.Green);
|
||||||
self.QueueActivity(order.Queued, new Move(self, order.TargetLocation, WDist.FromCells(8), null, true));
|
self.QueueActivity(order.Queued, new Move(self, loc, WDist.FromCells(8), null, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (order.OrderString == "Stop")
|
if (order.OrderString == "Stop")
|
||||||
|
|||||||
Reference in New Issue
Block a user