diff --git a/OpenRA.Game/Traits/Util.cs b/OpenRA.Game/Traits/Util.cs index 6b605ab4d1..d40af1fa6c 100755 --- a/OpenRA.Game/Traits/Util.cs +++ b/OpenRA.Game/Traits/Util.cs @@ -177,7 +177,7 @@ namespace OpenRA.Traits : new CPos[] {}; if (cells.Length == 0) - cells = new CPos[] { target.CenterLocation.ToCPos() }; + cells = new CPos[] { target.CenterPosition.ToCPos() }; return Util.ExpandFootprint(cells, true); } diff --git a/OpenRA.Game/Traits/World/Shroud.cs b/OpenRA.Game/Traits/World/Shroud.cs index 1e7355b5f7..2b87e4b872 100644 --- a/OpenRA.Game/Traits/World/Shroud.cs +++ b/OpenRA.Game/Traits/World/Shroud.cs @@ -202,7 +202,7 @@ namespace OpenRA.Traits return cells.Select(c => c.First); } - return new[] { a.CenterLocation.ToCPos() }; + return new[] { a.CenterPosition.ToCPos() }; } public void Explore(World world, CPos center, int range) diff --git a/OpenRA.Mods.RA/AI/HackyAI.cs b/OpenRA.Mods.RA/AI/HackyAI.cs index 0e7219789e..b864e199b0 100644 --- a/OpenRA.Mods.RA/AI/HackyAI.cs +++ b/OpenRA.Mods.RA/AI/HackyAI.cs @@ -518,7 +518,7 @@ namespace OpenRA.Mods.RA.AI if (owner.attackOrFleeFuzzy.CanAttack) { foreach(var u in owner.units) - owner.world.IssueOrder(new Order("AttackMove", u, false) { TargetLocation = owner.Target.CenterLocation.ToCPos() }); + owner.world.IssueOrder(new Order("AttackMove", u, false) { TargetLocation = owner.Target.CenterPosition.ToCPos() }); // We have gathered sufficient units. Attack the nearest enemy unit. owner.fsm.ChangeState(new GroundUnitsAttackMoveState(), true); return; @@ -560,7 +560,7 @@ namespace OpenRA.Mods.RA.AI { owner.world.IssueOrder(new Order("Stop", leader, false)); foreach (var unit in owner.units.Where(a => !ownUnits.Contains(a))) - owner.world.IssueOrder(new Order("AttackMove", unit, false) { TargetLocation = leader.CenterLocation.ToCPos() }); + owner.world.IssueOrder(new Order("AttackMove", unit, false) { TargetLocation = leader.CenterPosition.ToCPos() }); } else { diff --git a/OpenRA.Mods.RA/Activities/Follow.cs b/OpenRA.Mods.RA/Activities/Follow.cs index f806851da1..8e5bae7cd7 100644 --- a/OpenRA.Mods.RA/Activities/Follow.cs +++ b/OpenRA.Mods.RA/Activities/Follow.cs @@ -33,7 +33,7 @@ namespace OpenRA.Mods.RA.Activities if (IsCanceled) return NextActivity; if (!Target.IsValid) return NextActivity; - var inRange = ( Target.CenterLocation.ToCPos() - self.Location ).LengthSquared < Range * Range; + var inRange = ( Target.CenterPosition.ToCPos() - self.Location ).LengthSquared < Range * Range; if( inRange ) return this; if (--nextPathTime > 0) return this; diff --git a/OpenRA.Mods.RA/Activities/LayMines.cs b/OpenRA.Mods.RA/Activities/LayMines.cs index 487b500954..8b426786be 100644 --- a/OpenRA.Mods.RA/Activities/LayMines.cs +++ b/OpenRA.Mods.RA/Activities/LayMines.cs @@ -38,7 +38,7 @@ namespace OpenRA.Mods.RA.Activities return Util.SequenceActivities( new MoveAdjacentTo(Target.FromActor(rearmTarget)), - mobile.MoveTo(rearmTarget.CenterLocation.ToCPos(), rearmTarget), + mobile.MoveTo(rearmTarget.CenterPosition.ToCPos(), rearmTarget), new Rearm(self), new Repair(rearmTarget), this ); diff --git a/OpenRA.Mods.RA/Activities/MoveAdjacentTo.cs b/OpenRA.Mods.RA/Activities/MoveAdjacentTo.cs index 3615d40485..285312b7b0 100755 --- a/OpenRA.Mods.RA/Activities/MoveAdjacentTo.cs +++ b/OpenRA.Mods.RA/Activities/MoveAdjacentTo.cs @@ -41,7 +41,7 @@ namespace OpenRA.Mods.RA.Activities } ps1.heuristic = PathSearch.DefaultEstimator(mobile.toCell); - var ps2 = PathSearch.FromPoint(self.World, mobile.Info, self, mobile.toCell, target.CenterLocation.ToCPos(), true); + var ps2 = PathSearch.FromPoint(self.World, mobile.Info, self, mobile.toCell, target.CenterPosition.ToCPos(), true); var ret = self.World.WorldActor.Trait().FindBidiPath(ps1, ps2); return Util.SequenceActivities(mobile.MoveTo(() => ret), this); diff --git a/OpenRA.Mods.RA/Air/Aircraft.cs b/OpenRA.Mods.RA/Air/Aircraft.cs index 55958cb82f..0cb4bed6db 100755 --- a/OpenRA.Mods.RA/Air/Aircraft.cs +++ b/OpenRA.Mods.RA/Air/Aircraft.cs @@ -177,7 +177,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.CenterLocation.ToCPos() }; + return new Order(order.OrderID, self, queued) { TargetLocation = target.CenterPosition.ToCPos() }; return null; } diff --git a/OpenRA.Mods.RA/Armament.cs b/OpenRA.Mods.RA/Armament.cs index fe50383714..eae3275e4d 100755 --- a/OpenRA.Mods.RA/Armament.cs +++ b/OpenRA.Mods.RA/Armament.cs @@ -177,7 +177,7 @@ namespace OpenRA.Mods.RA if (target.IsActor) return Combat.WeaponValidForTarget(Weapon, target.Actor); else - return Combat.WeaponValidForTarget(Weapon, world, target.CenterLocation.ToCPos()); + return Combat.WeaponValidForTarget(Weapon, world, target.CenterPosition.ToCPos()); } public bool IsReloading { get { return FireDelay > 0; } } diff --git a/OpenRA.Mods.RA/Attack/AttackBase.cs b/OpenRA.Mods.RA/Attack/AttackBase.cs index 6f98b5f7e8..65641fd8ca 100644 --- a/OpenRA.Mods.RA/Attack/AttackBase.cs +++ b/OpenRA.Mods.RA/Attack/AttackBase.cs @@ -117,7 +117,7 @@ namespace OpenRA.Mods.RA if (target.IsActor) return new Order("Attack", self, queued) { TargetActor = target.Actor }; else - return new Order("Attack", self, queued) { TargetLocation = target.CenterLocation.ToCPos() }; + return new Order("Attack", self, queued) { TargetLocation = target.CenterPosition.ToCPos() }; } return null; } diff --git a/OpenRA.Mods.RA/Harvester.cs b/OpenRA.Mods.RA/Harvester.cs index 7a17785dd2..562364f255 100644 --- a/OpenRA.Mods.RA/Harvester.cs +++ b/OpenRA.Mods.RA/Harvester.cs @@ -250,7 +250,7 @@ namespace OpenRA.Mods.RA return new Order(order.OrderID, self, queued) { TargetActor = target.Actor }; if (order.OrderID == "Harvest") - return new Order(order.OrderID, self, queued) { TargetLocation = target.CenterLocation.ToCPos() }; + return new Order(order.OrderID, self, queued) { TargetLocation = target.CenterPosition.ToCPos() }; return null; } diff --git a/OpenRA.Mods.RA/Minelayer.cs b/OpenRA.Mods.RA/Minelayer.cs index da775f83fc..6d638a0e0e 100644 --- a/OpenRA.Mods.RA/Minelayer.cs +++ b/OpenRA.Mods.RA/Minelayer.cs @@ -46,7 +46,7 @@ namespace OpenRA.Mods.RA { if( order is BeginMinefieldOrderTargeter ) { - var start = target.CenterLocation.ToCPos(); + var start = target.CenterPosition.ToCPos(); self.World.OrderGenerator = new MinefieldOrderGenerator( self, start ); return new Order("BeginMinefield", self, false) { TargetLocation = start }; } diff --git a/OpenRA.Mods.RA/Move/Mobile.cs b/OpenRA.Mods.RA/Move/Mobile.cs index 2fd6c1b279..b1c44e96a1 100755 --- a/OpenRA.Mods.RA/Move/Mobile.cs +++ b/OpenRA.Mods.RA/Move/Mobile.cs @@ -234,7 +234,7 @@ namespace OpenRA.Mods.RA.Move if (order is MoveOrderTargeter) { if (Info.OnRails) return null; - return new Order("Move", self, queued) { TargetLocation = target.CenterLocation.ToCPos() }; + return new Order("Move", self, queued) { TargetLocation = target.CenterPosition.ToCPos() }; } return null; } diff --git a/OpenRA.Mods.RA/Move/Move.cs b/OpenRA.Mods.RA/Move/Move.cs index 6b35e2acf0..097e1ab51f 100755 --- a/OpenRA.Mods.RA/Move/Move.cs +++ b/OpenRA.Mods.RA/Move/Move.cs @@ -61,7 +61,7 @@ namespace OpenRA.Mods.RA.Move public Move(Target target, int range) { this.getPath = (self,mobile) => self.World.WorldActor.Trait().FindUnitPathToRange( - mobile.toCell, target.CenterLocation.ToCPos(), + mobile.toCell, target.CenterPosition.ToCPos(), range, self); this.destination = null; this.nearEnough = range; diff --git a/OpenRA.Mods.RA/Player/BaseAttackNotifier.cs b/OpenRA.Mods.RA/Player/BaseAttackNotifier.cs index a5495f6277..8ce7d9e876 100644 --- a/OpenRA.Mods.RA/Player/BaseAttackNotifier.cs +++ b/OpenRA.Mods.RA/Player/BaseAttackNotifier.cs @@ -44,7 +44,7 @@ namespace OpenRA.Mods.RA if (self.World.FrameNumber - lastAttackTime > info.NotifyInterval * 25) Sound.PlayNotification(self.Owner, "Speech", "BaseAttack", self.Owner.Country.Race); - lastAttackLocation = self.CenterLocation.ToCPos(); + lastAttackLocation = self.CenterPosition.ToCPos(); lastAttackTime = self.World.FrameNumber; } } diff --git a/OpenRA.Mods.RA/Player/HarvesterAttackNotifier.cs b/OpenRA.Mods.RA/Player/HarvesterAttackNotifier.cs index ac4e76df59..f003381ad1 100644 --- a/OpenRA.Mods.RA/Player/HarvesterAttackNotifier.cs +++ b/OpenRA.Mods.RA/Player/HarvesterAttackNotifier.cs @@ -44,7 +44,7 @@ namespace OpenRA.Mods.RA if (self.World.FrameNumber - lastAttackTime > info.NotifyInterval * 25) Sound.PlayNotification(self.Owner, "Speech", "HarvesterAttack", self.Owner.Country.Race); - lastAttackLocation = self.CenterLocation.ToCPos(); + lastAttackLocation = self.CenterPosition.ToCPos(); lastAttackTime = self.World.FrameNumber; } } diff --git a/OpenRA.Mods.RA/RallyPoint.cs b/OpenRA.Mods.RA/RallyPoint.cs index 36a0ff52a3..1db32f3e2b 100755 --- a/OpenRA.Mods.RA/RallyPoint.cs +++ b/OpenRA.Mods.RA/RallyPoint.cs @@ -42,7 +42,7 @@ namespace OpenRA.Mods.RA public Order IssueOrder( Actor self, IOrderTargeter order, Target target, bool queued ) { if( order.OrderID == "SetRallyPoint" ) - return new Order(order.OrderID, self, false) { TargetLocation = target.CenterLocation.ToCPos() }; + return new Order(order.OrderID, self, false) { TargetLocation = target.CenterPosition.ToCPos() }; return null; } diff --git a/OpenRA.Mods.RA/Repairable.cs b/OpenRA.Mods.RA/Repairable.cs index 9137a95360..35b1e8bc9c 100644 --- a/OpenRA.Mods.RA/Repairable.cs +++ b/OpenRA.Mods.RA/Repairable.cs @@ -78,7 +78,7 @@ namespace OpenRA.Mods.RA self.CancelActivity(); self.QueueActivity(new MoveAdjacentTo(target)); - self.QueueActivity(mobile.MoveTo(order.TargetActor.CenterLocation.ToCPos(), order.TargetActor)); + self.QueueActivity(mobile.MoveTo(order.TargetActor.CenterPosition.ToCPos(), order.TargetActor)); self.QueueActivity(new Rearm(self)); self.QueueActivity(new Repair(order.TargetActor)); diff --git a/OpenRA.Mods.RA/TargetableUnit.cs b/OpenRA.Mods.RA/TargetableUnit.cs index 37da70da40..2cda0fa15a 100755 --- a/OpenRA.Mods.RA/TargetableUnit.cs +++ b/OpenRA.Mods.RA/TargetableUnit.cs @@ -54,7 +54,7 @@ namespace OpenRA.Mods.RA public virtual IEnumerable TargetableCells( Actor self ) { - yield return self.CenterLocation.ToCPos(); + yield return self.CenterPosition.ToCPos(); } } }