Remove Order.TargetLocation from Mobile.
This commit is contained in:
@@ -699,16 +699,15 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
if (order.OrderString == "Move")
|
||||
{
|
||||
var loc = self.World.Map.Clamp(order.TargetLocation);
|
||||
|
||||
if (!Info.LocomotorInfo.MoveIntoShroud && !self.Owner.Shroud.IsExplored(loc))
|
||||
var cell = self.World.Map.Clamp(this.self.World.Map.CellContaining(order.Target.CenterPosition));
|
||||
if (!Info.LocomotorInfo.MoveIntoShroud && !self.Owner.Shroud.IsExplored(cell))
|
||||
return;
|
||||
|
||||
if (!order.Queued)
|
||||
self.CancelActivity();
|
||||
|
||||
self.SetTargetLine(Target.FromCell(self.World, loc), Color.Green);
|
||||
self.QueueActivity(order.Queued, new Move(self, loc, WDist.FromCells(8), null, true));
|
||||
self.SetTargetLine(Target.FromCell(self.World, cell), Color.Green);
|
||||
self.QueueActivity(order.Queued, new Move(self, cell, WDist.FromCells(8), null, true));
|
||||
}
|
||||
|
||||
if (order.OrderString == "Stop")
|
||||
@@ -720,12 +719,17 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
string IOrderVoice.VoicePhraseForOrder(Actor self, Order order)
|
||||
{
|
||||
if (!Info.LocomotorInfo.MoveIntoShroud && !self.Owner.Shroud.IsExplored(order.TargetLocation))
|
||||
return null;
|
||||
|
||||
switch (order.OrderString)
|
||||
{
|
||||
case "Move":
|
||||
if (!Info.LocomotorInfo.MoveIntoShroud && order.Target.Type != TargetType.Invalid)
|
||||
{
|
||||
var cell = self.World.Map.CellContaining(order.Target.CenterPosition);
|
||||
if (!self.Owner.Shroud.IsExplored(cell))
|
||||
return null;
|
||||
}
|
||||
|
||||
return Info.Voice;
|
||||
case "Scatter":
|
||||
case "Stop":
|
||||
return Info.Voice;
|
||||
|
||||
Reference in New Issue
Block a user