Replace CPos.CenterPosition -> Map.CenterOfCell.

This commit is contained in:
Paul Chote
2013-09-17 22:27:19 +12:00
parent b6d1d26eeb
commit 7b52fa52b6
48 changed files with 105 additions and 90 deletions

View File

@@ -64,7 +64,7 @@ namespace OpenRA.Mods.RA
var delta = new WVec(0, -1024, 0).Rotate(attackRotation);
var altitude = self.World.Map.Rules.Actors[info.UnitType].Traits.Get<PlaneInfo>().CruiseAltitude.Range;
var target = order.TargetLocation.CenterPosition + new WVec(0, 0, altitude);
var target = self.World.Map.CenterOfCell(order.TargetLocation) + new WVec(0, 0, altitude);
var startEdge = target - (self.World.Map.DistanceToEdge(target, -delta) + info.Cordon).Range * delta / 1024;
var finishEdge = target + (self.World.Map.DistanceToEdge(target, delta) + info.Cordon).Range * delta / 1024;
@@ -174,7 +174,7 @@ namespace OpenRA.Mods.RA
beacon = new Beacon(
order.Player,
order.TargetLocation.CenterPosition,
self.World.Map.CenterOfCell(order.TargetLocation),
Info.BeaconPalettePrefix,
Info.BeaconPoster,
Info.BeaconPosterPalette,