Remove Order.TargetLocation from beacons.

This commit is contained in:
Paul Chote
2018-12-01 11:42:18 +00:00
parent d91d96a2e3
commit 9c4231165b
2 changed files with 4 additions and 5 deletions

View File

@@ -53,7 +53,7 @@ namespace OpenRA.Mods.Cnc.Traits
if (order.OrderString != "PlaceBeacon") if (order.OrderString != "PlaceBeacon")
return; return;
var pos = self.World.Map.CenterOfCell(order.TargetLocation); var pos = order.Target.CenterPosition;
self.World.AddFrameEndTask(w => self.World.AddFrameEndTask(w =>
{ {

View File

@@ -53,14 +53,13 @@ namespace OpenRA.Mods.Common.Traits
if (order.OrderString != "PlaceBeacon") if (order.OrderString != "PlaceBeacon")
return; return;
var pos = self.World.Map.CenterOfCell(order.TargetLocation);
self.World.AddFrameEndTask(w => self.World.AddFrameEndTask(w =>
{ {
if (playerBeacon != null) if (playerBeacon != null)
self.World.Remove(playerBeacon); self.World.Remove(playerBeacon);
playerBeacon = new Beacon(self.Owner, pos, info.Duration, info.Palette, info.IsPlayerPalette, info.BeaconImage, info.ArrowSequence, info.CircleSequence); playerBeacon = new Beacon(self.Owner, order.Target.CenterPosition, info.Duration,
info.Palette, info.IsPlayerPalette, info.BeaconImage, info.ArrowSequence, info.CircleSequence);
self.World.Add(playerBeacon); self.World.Add(playerBeacon);
@@ -75,7 +74,7 @@ namespace OpenRA.Mods.Common.Traits
playerRadarPing = radarPings.Add( playerRadarPing = radarPings.Add(
() => self.Owner.IsAlliedWith(self.World.RenderPlayer), () => self.Owner.IsAlliedWith(self.World.RenderPlayer),
pos, order.Target.CenterPosition,
self.Owner.Color.RGB, self.Owner.Color.RGB,
info.Duration); info.Duration);
} }