Remove Order.TargetLocation from Aircraft.

This commit is contained in:
Paul Chote
2018-12-01 11:53:51 +00:00
parent f70a452c56
commit cd92e94d74

View File

@@ -740,12 +740,17 @@ namespace OpenRA.Mods.Common.Traits
public string VoicePhraseForOrder(Actor self, Order order) public string VoicePhraseForOrder(Actor self, Order order)
{ {
if (!Info.MoveIntoShroud && !self.Owner.Shroud.IsExplored(order.TargetLocation))
return null;
switch (order.OrderString) switch (order.OrderString)
{ {
case "Move": case "Move":
if (!Info.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 "Enter": case "Enter":
case "Stop": case "Stop":
return Info.Voice; return Info.Voice;
@@ -759,8 +764,7 @@ namespace OpenRA.Mods.Common.Traits
{ {
if (order.OrderString == "Move") if (order.OrderString == "Move")
{ {
var cell = self.World.Map.Clamp(order.TargetLocation); var cell = self.World.Map.Clamp(self.World.Map.CellContaining(order.Target.CenterPosition));
if (!Info.MoveIntoShroud && !self.Owner.Shroud.IsExplored(cell)) if (!Info.MoveIntoShroud && !self.Owner.Shroud.IsExplored(cell))
return; return;