Replace WPos.ToCPos -> Map.CellContaining.
This commit is contained in:
6
OpenRA.Mods.RA/Air/Aircraft.cs
Executable file → Normal file
6
OpenRA.Mods.RA/Air/Aircraft.cs
Executable file → Normal file
@@ -45,7 +45,7 @@ namespace OpenRA.Mods.RA.Air
|
||||
|
||||
[Sync] public int Facing { get; set; }
|
||||
[Sync] public WPos CenterPosition { get; private set; }
|
||||
public CPos TopLeft { get { return CenterPosition.ToCPos(); } }
|
||||
public CPos TopLeft { get { return self.World.Map.CellContaining(CenterPosition); } }
|
||||
public IDisposable Reservation;
|
||||
public int ROT { get { return info.ROT; } }
|
||||
|
||||
@@ -201,7 +201,7 @@ namespace OpenRA.Mods.RA.Air
|
||||
return new Order(order.OrderID, self, queued) { TargetActor = target.Actor };
|
||||
|
||||
if (order.OrderID == "Move")
|
||||
return new Order(order.OrderID, self, queued) { TargetLocation = target.CenterPosition.ToCPos() };
|
||||
return new Order(order.OrderID, self, queued) { TargetLocation = self.World.Map.CellContaining(target.CenterPosition) };
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -246,7 +246,7 @@ namespace OpenRA.Mods.RA.Air
|
||||
return false;
|
||||
|
||||
IsQueued = modifiers.HasModifier(TargetModifiers.ForceQueue);
|
||||
cursor = self.World.Map.Contains(target.CenterPosition.ToCPos()) ? "move" : "move-blocked";
|
||||
cursor = self.World.Map.Contains(self.World.Map.CellContaining(target.CenterPosition)) ? "move" : "move-blocked";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.RA.Air
|
||||
var rp = hasHost ? host.TraitOrDefault<RallyPoint>() : null;
|
||||
|
||||
var destination = rp != null ? rp.rallyPoint :
|
||||
(hasHost ? host.CenterPosition.ToCPos() : self.CenterPosition.ToCPos());
|
||||
(hasHost ? self.World.Map.CellContaining(host.CenterPosition) : self.Location);
|
||||
|
||||
return new AttackMove.AttackMoveActivity(self, self.Trait<IMove>().MoveTo(destination, 1));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user