diff --git a/OpenRA.Game/Orders/UnitOrderGenerator.cs b/OpenRA.Game/Orders/UnitOrderGenerator.cs index d5bf8ea790..bf4fcb8f98 100644 --- a/OpenRA.Game/Orders/UnitOrderGenerator.cs +++ b/OpenRA.Game/Orders/UnitOrderGenerator.cs @@ -119,7 +119,7 @@ namespace OpenRA.Orders .Select(x => new { Trait = trait, Order = x })) .OrderByDescending(x => x.Order.OrderPriority)) { - var actorsAt = self.World.ActorMap.GetUnitsAt(self.World.Map.CellContaining(target.CenterPosition)).ToList(); + var actorsAt = self.World.ActorMap.GetActorsAt(self.World.Map.CellContaining(target.CenterPosition)).ToList(); var modifiers = TargetModifiers.None; if (mi.Modifiers.HasModifier(Modifiers.Ctrl)) diff --git a/OpenRA.Game/Traits/World/ActorMap.cs b/OpenRA.Game/Traits/World/ActorMap.cs index 82a99ccd98..42a731d692 100644 --- a/OpenRA.Game/Traits/World/ActorMap.cs +++ b/OpenRA.Game/Traits/World/ActorMap.cs @@ -68,7 +68,7 @@ namespace OpenRA.Traits return; var oldActors = currentActors; - currentActors = Footprint.SelectMany(actorMap.GetUnitsAt).ToList(); + currentActors = Footprint.SelectMany(actorMap.GetActorsAt).ToList(); var entered = currentActors.Except(oldActors); var exited = oldActors.Except(currentActors); @@ -187,10 +187,10 @@ namespace OpenRA.Traits actorShouldBeRemoved = removeActorPosition.Contains; } - sealed class UnitsAtEnumerator : IEnumerator + sealed class ActorsAtEnumerator : IEnumerator { InfluenceNode node; - public UnitsAtEnumerator(InfluenceNode node) { this.node = node; } + public ActorsAtEnumerator(InfluenceNode node) { this.node = node; } public void Reset() { throw new NotSupportedException(); } public Actor Current { get; private set; } object IEnumerator.Current { get { return Current; } } @@ -209,23 +209,23 @@ namespace OpenRA.Traits } } - sealed class UnitsAtEnumerable : IEnumerable + sealed class ActorsAtEnumerable : IEnumerable { readonly InfluenceNode node; - public UnitsAtEnumerable(InfluenceNode node) { this.node = node; } - public IEnumerator GetEnumerator() { return new UnitsAtEnumerator(node); } + public ActorsAtEnumerable(InfluenceNode node) { this.node = node; } + public IEnumerator GetEnumerator() { return new ActorsAtEnumerator(node); } IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } } - public IEnumerable GetUnitsAt(CPos a) + public IEnumerable GetActorsAt(CPos a) { var uv = a.ToMPos(map); if (!influence.Contains(uv)) return Enumerable.Empty(); - return new UnitsAtEnumerable(influence[uv]); + return new ActorsAtEnumerable(influence[uv]); } - public IEnumerable GetUnitsAt(CPos a, SubCell sub) + public IEnumerable GetActorsAt(CPos a, SubCell sub) { var uv = a.ToMPos(map); if (!influence.Contains(uv)) @@ -243,14 +243,14 @@ namespace OpenRA.Traits public SubCell FreeSubCell(CPos cell, SubCell preferredSubCell = SubCell.Any, bool checkTransient = true) { - if (preferredSubCell > SubCell.Any && !AnyUnitsAt(cell, preferredSubCell, checkTransient)) + if (preferredSubCell > SubCell.Any && !AnyActorsAt(cell, preferredSubCell, checkTransient)) return preferredSubCell; - if (!AnyUnitsAt(cell)) + if (!AnyActorsAt(cell)) return map.DefaultSubCell; for (var i = (int)SubCell.First; i < map.SubCellOffsets.Length; i++) - if (i != (int)preferredSubCell && !AnyUnitsAt(cell, (SubCell)i, checkTransient)) + if (i != (int)preferredSubCell && !AnyActorsAt(cell, (SubCell)i, checkTransient)) return (SubCell)i; return SubCell.Invalid; @@ -258,20 +258,20 @@ namespace OpenRA.Traits public SubCell FreeSubCell(CPos cell, SubCell preferredSubCell, Func checkIfBlocker) { - if (preferredSubCell > SubCell.Any && !AnyUnitsAt(cell, preferredSubCell, checkIfBlocker)) + if (preferredSubCell > SubCell.Any && !AnyActorsAt(cell, preferredSubCell, checkIfBlocker)) return preferredSubCell; - if (!AnyUnitsAt(cell)) + if (!AnyActorsAt(cell)) return map.DefaultSubCell; for (var i = (int)SubCell.First; i < map.SubCellOffsets.Length; i++) - if (i != (int)preferredSubCell && !AnyUnitsAt(cell, (SubCell)i, checkIfBlocker)) + if (i != (int)preferredSubCell && !AnyActorsAt(cell, (SubCell)i, checkIfBlocker)) return (SubCell)i; return SubCell.Invalid; } // NOTE: always includes transients with influence - public bool AnyUnitsAt(CPos a) + public bool AnyActorsAt(CPos a) { var uv = a.ToMPos(map); if (!influence.Contains(uv)) @@ -281,7 +281,7 @@ namespace OpenRA.Traits } // NOTE: can not check aircraft - public bool AnyUnitsAt(CPos a, SubCell sub, bool checkTransient = true) + public bool AnyActorsAt(CPos a, SubCell sub, bool checkTransient = true) { var uv = a.ToMPos(map); if (!influence.Contains(uv)) @@ -305,7 +305,7 @@ namespace OpenRA.Traits } // NOTE: can not check aircraft - public bool AnyUnitsAt(CPos a, SubCell sub, Func withCondition) + public bool AnyActorsAt(CPos a, SubCell sub, Func withCondition) { var uv = a.ToMPos(map); if (!influence.Contains(uv)) diff --git a/OpenRA.Mods.Common/Activities/Rearm.cs b/OpenRA.Mods.Common/Activities/Rearm.cs index 8f57fce2e4..0a09b3f548 100644 --- a/OpenRA.Mods.Common/Activities/Rearm.cs +++ b/OpenRA.Mods.Common/Activities/Rearm.cs @@ -48,7 +48,7 @@ namespace OpenRA.Mods.Common.Activities continue; // HACK to check if we are on the helipad/airfield/etc. - var hostBuilding = self.World.ActorMap.GetUnitsAt(self.Location) + var hostBuilding = self.World.ActorMap.GetActorsAt(self.Location) .FirstOrDefault(a => a.Info.HasTraitInfo()); if (hostBuilding == null || !hostBuilding.IsInWorld) diff --git a/OpenRA.Mods.Common/ActorExts.cs b/OpenRA.Mods.Common/ActorExts.cs index 651a2ba6f3..74f08d816a 100644 --- a/OpenRA.Mods.Common/ActorExts.cs +++ b/OpenRA.Mods.Common/ActorExts.cs @@ -110,12 +110,12 @@ namespace OpenRA.Mods.Common public static void NotifyBlocker(this Actor self, CPos position) { - NotifyBlocker(self, self.World.ActorMap.GetUnitsAt(position)); + NotifyBlocker(self, self.World.ActorMap.GetActorsAt(position)); } public static void NotifyBlocker(this Actor self, IEnumerable positions) { - NotifyBlocker(self, positions.SelectMany(p => self.World.ActorMap.GetUnitsAt(p))); + NotifyBlocker(self, positions.SelectMany(p => self.World.ActorMap.GetActorsAt(p))); } public static bool CanHarvestAt(this Actor self, CPos pos, ResourceLayer resLayer, HarvesterInfo harvInfo, diff --git a/OpenRA.Mods.Common/Orders/PlaceBuildingOrderGenerator.cs b/OpenRA.Mods.Common/Orders/PlaceBuildingOrderGenerator.cs index aceb041fb7..e8953d2a58 100644 --- a/OpenRA.Mods.Common/Orders/PlaceBuildingOrderGenerator.cs +++ b/OpenRA.Mods.Common/Orders/PlaceBuildingOrderGenerator.cs @@ -227,7 +227,7 @@ namespace OpenRA.Mods.Common.Orders var neightborTiles = Util.ExpandFootprint(allTiles, true).Except(allTiles) .Where(world.Map.Contains).ToList(); - var blockers = allTiles.SelectMany(world.ActorMap.GetUnitsAt) + var blockers = allTiles.SelectMany(world.ActorMap.GetActorsAt) .Where(a => a.Owner == producer.Owner && a.IsIdle) .Select(a => new TraitPair { Actor = a, Trait = a.TraitOrDefault() }); diff --git a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs index 620d732280..95ea12961a 100644 --- a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs +++ b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs @@ -246,7 +246,7 @@ namespace OpenRA.Mods.Common.Traits if (self.World.Map.DistanceAboveTerrain(CenterPosition).Length != 0) return null; // not on the ground. - return self.World.ActorMap.GetUnitsAt(self.Location) + return self.World.ActorMap.GetActorsAt(self.Location) .FirstOrDefault(a => a.Info.HasTraitInfo()); } @@ -312,7 +312,7 @@ namespace OpenRA.Mods.Common.Traits if (!self.World.Map.Contains(cell)) return false; - if (self.World.ActorMap.AnyUnitsAt(cell)) + if (self.World.ActorMap.AnyActorsAt(cell)) return false; var type = self.World.Map.GetTerrainInfo(cell).Type; @@ -445,7 +445,7 @@ namespace OpenRA.Mods.Common.Traits public bool CanEnterTargetNow(Actor self, Target target) { - if (target.Positions.Any(p => self.World.ActorMap.GetUnitsAt(self.World.Map.CellContaining(p)).Any(a => a != self && a != target.Actor))) + if (target.Positions.Any(p => self.World.ActorMap.GetActorsAt(self.World.Map.CellContaining(p)).Any(a => a != self && a != target.Actor))) return false; var res = target.Actor.TraitOrDefault(); diff --git a/OpenRA.Mods.Common/Traits/BlocksProjectiles.cs b/OpenRA.Mods.Common/Traits/BlocksProjectiles.cs index 249b2e8ea7..742441e808 100644 --- a/OpenRA.Mods.Common/Traits/BlocksProjectiles.cs +++ b/OpenRA.Mods.Common/Traits/BlocksProjectiles.cs @@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.Traits public static bool AnyBlockingActorAt(World world, WPos pos) { - return world.ActorMap.GetUnitsAt(world.Map.CellContaining(pos)) + return world.ActorMap.GetActorsAt(world.Map.CellContaining(pos)) .Any(a => a.TraitsImplementing().Any(Exts.IsTraitEnabled)); } } diff --git a/OpenRA.Mods.Common/Traits/Buildings/Bridge.cs b/OpenRA.Mods.Common/Traits/Buildings/Bridge.cs index f9240716b0..f6971dc45b 100644 --- a/OpenRA.Mods.Common/Traits/Buildings/Bridge.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/Bridge.cs @@ -206,7 +206,7 @@ namespace OpenRA.Mods.Common.Traits void KillUnitsOnBridge() { foreach (var c in footprint.Keys) - foreach (var a in self.World.ActorMap.GetUnitsAt(c)) + foreach (var a in self.World.ActorMap.GetActorsAt(c)) if (a.Info.HasTraitInfo() && !a.Trait().CanEnterCell(c)) a.Kill(self); } diff --git a/OpenRA.Mods.Common/Traits/Buildings/Building.cs b/OpenRA.Mods.Common/Traits/Buildings/Building.cs index bf7276bac6..14b96d36e0 100644 --- a/OpenRA.Mods.Common/Traits/Buildings/Building.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/Building.cs @@ -85,7 +85,7 @@ namespace OpenRA.Mods.Common.Traits if (buildingAtPos == null) { - var unitsAtPos = world.ActorMap.GetUnitsAt(pos).Where(a => a.IsInWorld + var unitsAtPos = world.ActorMap.GetActorsAt(pos).Where(a => a.IsInWorld && (a.Owner == p || (allyBuildRadius && a.Owner.Stances[p] == Stance.Ally)) && a.Info.HasTraitInfo()); diff --git a/OpenRA.Mods.Common/Traits/Buildings/BuildingUtils.cs b/OpenRA.Mods.Common/Traits/Buildings/BuildingUtils.cs index b47f724e25..2cb56e7ffa 100644 --- a/OpenRA.Mods.Common/Traits/Buildings/BuildingUtils.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/BuildingUtils.cs @@ -24,7 +24,7 @@ namespace OpenRA.Mods.Common.Traits if (world.WorldActor.Trait().GetBuildingAt(cell) != null) return false; - if (!bi.AllowInvalidPlacement && world.ActorMap.GetUnitsAt(cell).Any(a => a != toIgnore)) + if (!bi.AllowInvalidPlacement && world.ActorMap.GetActorsAt(cell).Any(a => a != toIgnore)) return false; var tile = world.Map.MapTiles.Value[cell]; diff --git a/OpenRA.Mods.Common/Traits/Crates/Crate.cs b/OpenRA.Mods.Common/Traits/Crates/Crate.cs index 76c3ecf91e..722c01c26d 100644 --- a/OpenRA.Mods.Common/Traits/Crates/Crate.cs +++ b/OpenRA.Mods.Common/Traits/Crates/Crate.cs @@ -91,7 +91,7 @@ namespace OpenRA.Mods.Common.Traits public void OnLanded() { // Check whether the crate landed on anything - var landedOn = self.World.ActorMap.GetUnitsAt(self.Location) + var landedOn = self.World.ActorMap.GetActorsAt(self.Location) .Where(a => a != self); if (!landedOn.Any()) @@ -177,7 +177,7 @@ namespace OpenRA.Mods.Common.Traits if (!checkTransientActors) return SubCell.FullCell; - return !self.World.ActorMap.GetUnitsAt(cell) + return !self.World.ActorMap.GetActorsAt(cell) .Where(x => x != ignoreActor) .Any() ? SubCell.FullCell : SubCell.Invalid; } diff --git a/OpenRA.Mods.Common/Traits/Husk.cs b/OpenRA.Mods.Common/Traits/Husk.cs index 78da105972..e1e6eac582 100644 --- a/OpenRA.Mods.Common/Traits/Husk.cs +++ b/OpenRA.Mods.Common/Traits/Husk.cs @@ -82,7 +82,7 @@ namespace OpenRA.Mods.Common.Traits if (!checkTransientActors) return SubCell.FullCell; - return self.World.ActorMap.GetUnitsAt(cell) + return self.World.ActorMap.GetActorsAt(cell) .All(x => x == ignoreActor) ? SubCell.FullCell : SubCell.Invalid; } diff --git a/OpenRA.Mods.Common/Traits/Mobile.cs b/OpenRA.Mods.Common/Traits/Mobile.cs index fb3e763aee..2d33a2d624 100644 --- a/OpenRA.Mods.Common/Traits/Mobile.cs +++ b/OpenRA.Mods.Common/Traits/Mobile.cs @@ -217,7 +217,7 @@ namespace OpenRA.Mods.Common.Traits if (SharesCell && world.ActorMap.HasFreeSubCell(cell)) return true; - foreach (var otherActor in world.ActorMap.GetUnitsAt(cell)) + foreach (var otherActor in world.ActorMap.GetActorsAt(cell)) if (IsBlockedBy(self, otherActor, ignoreActor, check)) return false; @@ -283,13 +283,13 @@ namespace OpenRA.Mods.Common.Traits Func checkTransient = otherActor => IsBlockedBy(self, otherActor, ignoreActor, check); if (!SharesCell) - return world.ActorMap.AnyUnitsAt(cell, SubCell.FullCell, checkTransient) ? SubCell.Invalid : SubCell.FullCell; + return world.ActorMap.AnyActorsAt(cell, SubCell.FullCell, checkTransient) ? SubCell.Invalid : SubCell.FullCell; return world.ActorMap.FreeSubCell(cell, preferredSubCell, checkTransient); } if (!SharesCell) - return world.ActorMap.AnyUnitsAt(cell, SubCell.FullCell) ? SubCell.Invalid : SubCell.FullCell; + return world.ActorMap.AnyActorsAt(cell, SubCell.FullCell) ? SubCell.Invalid : SubCell.FullCell; return world.ActorMap.FreeSubCell(cell, preferredSubCell); } @@ -581,7 +581,7 @@ namespace OpenRA.Mods.Common.Traits if (self.CenterPosition.Z != 0) return; - var crushables = self.World.ActorMap.GetUnitsAt(ToCell).Where(a => a != self) + var crushables = self.World.ActorMap.GetActorsAt(ToCell).Where(a => a != self) .SelectMany(a => a.TraitsImplementing().Where(b => b.CrushableBy(Info.Crushes, self.Owner))); foreach (var crushable in crushables) crushable.WarnCrush(self); @@ -593,7 +593,7 @@ namespace OpenRA.Mods.Common.Traits if (!self.IsAtGroundLevel()) return; - var crushables = self.World.ActorMap.GetUnitsAt(ToCell).Where(a => a != self) + var crushables = self.World.ActorMap.GetActorsAt(ToCell).Where(a => a != self) .SelectMany(a => a.TraitsImplementing().Where(c => c.CrushableBy(Info.Crushes, self.Owner))); foreach (var crushable in crushables) crushable.OnCrush(self); @@ -664,7 +664,7 @@ namespace OpenRA.Mods.Common.Traits else { var cellInfo = notStupidCells - .SelectMany(c => self.World.ActorMap.GetUnitsAt(c) + .SelectMany(c => self.World.ActorMap.GetActorsAt(c) .Where(a => a.IsIdle && a.Info.HasTraitInfo()), (c, a) => new { Cell = c, Actor = a }) .RandomOrDefault(self.World.SharedRandom); diff --git a/OpenRA.Mods.Common/Traits/Render/WithProductionDoorOverlay.cs b/OpenRA.Mods.Common/Traits/Render/WithProductionDoorOverlay.cs index 73484d9351..1fb877e033 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithProductionDoorOverlay.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithProductionDoorOverlay.cs @@ -63,7 +63,7 @@ namespace OpenRA.Mods.Common.Traits public void Tick(Actor self) { - if (desiredFrame > 0 && !self.World.ActorMap.GetUnitsAt(openExit).Any(a => a != self)) + if (desiredFrame > 0 && !self.World.ActorMap.GetActorsAt(openExit).Any(a => a != self)) desiredFrame = 0; } diff --git a/OpenRA.Mods.Common/Traits/Render/WithWallSpriteBody.cs b/OpenRA.Mods.Common/Traits/Render/WithWallSpriteBody.cs index 26284be3b7..ae80d16913 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithWallSpriteBody.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithWallSpriteBody.cs @@ -92,7 +92,7 @@ namespace OpenRA.Mods.Common.Traits // Update connection to neighbours var adjacentActors = CVec.Directions.SelectMany(dir => - self.World.ActorMap.GetUnitsAt(self.Location + dir)); + self.World.ActorMap.GetActorsAt(self.Location + dir)); adjacent = 0; foreach (var a in adjacentActors) @@ -126,7 +126,7 @@ namespace OpenRA.Mods.Common.Traits static void UpdateNeighbours(Actor self) { var adjacentActors = CVec.Directions.SelectMany(dir => - self.World.ActorMap.GetUnitsAt(self.Location + dir)) + self.World.ActorMap.GetActorsAt(self.Location + dir)) .Select(a => a.TraitOrDefault()) .Where(a => a != null); diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/GrantUpgradePower.cs b/OpenRA.Mods.Common/Traits/SupportPowers/GrantUpgradePower.cs index 49b8ad1d21..327309a75c 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/GrantUpgradePower.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/GrantUpgradePower.cs @@ -88,7 +88,7 @@ namespace OpenRA.Mods.Common.Traits var tiles = Self.World.Map.FindTilesInCircle(xy, range); var units = new List(); foreach (var t in tiles) - units.AddRange(Self.World.ActorMap.GetUnitsAt(t)); + units.AddRange(Self.World.ActorMap.GetActorsAt(t)); return units.Distinct().Where(a => { diff --git a/OpenRA.Mods.Common/Traits/World/CrateSpawner.cs b/OpenRA.Mods.Common/Traits/World/CrateSpawner.cs index c7e2716761..f848b7a63c 100644 --- a/OpenRA.Mods.Common/Traits/World/CrateSpawner.cs +++ b/OpenRA.Mods.Common/Traits/World/CrateSpawner.cs @@ -149,7 +149,7 @@ namespace OpenRA.Mods.Common.Traits // Don't drop on any actors if (self.World.WorldActor.Trait().GetBuildingAt(p) != null - || self.World.ActorMap.GetUnitsAt(p).Any()) + || self.World.ActorMap.GetActorsAt(p).Any()) continue; return p; diff --git a/OpenRA.Mods.Common/Traits/World/ResourceLayer.cs b/OpenRA.Mods.Common/Traits/World/ResourceLayer.cs index dbe8e2176d..f11e9c9e95 100644 --- a/OpenRA.Mods.Common/Traits/World/ResourceLayer.cs +++ b/OpenRA.Mods.Common/Traits/World/ResourceLayer.cs @@ -184,7 +184,7 @@ namespace OpenRA.Mods.Common.Traits if (!rt.Info.AllowedTerrainTypes.Contains(world.Map.GetTerrainInfo(cell).Type)) return false; - if (!rt.Info.AllowUnderActors && world.ActorMap.AnyUnitsAt(cell)) + if (!rt.Info.AllowUnderActors && world.ActorMap.AnyActorsAt(cell)) return false; if (!rt.Info.AllowUnderBuildings && buildingInfluence.GetBuildingAt(cell) != null) diff --git a/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs b/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs index 39090bd8b5..aed6e0510d 100644 --- a/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs +++ b/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs @@ -63,7 +63,7 @@ namespace OpenRA.Mods.Common.Warheads public static bool GetDirectHit(World world, CPos cell, WPos pos) { - foreach (var unit in world.ActorMap.GetUnitsAt(cell)) + foreach (var unit in world.ActorMap.GetActorsAt(cell)) { var healthInfo = unit.Info.TraitInfoOrDefault(); if (healthInfo == null) diff --git a/OpenRA.Mods.D2k/Activities/SwallowActor.cs b/OpenRA.Mods.D2k/Activities/SwallowActor.cs index c4f496f6e7..5d7d94de81 100644 --- a/OpenRA.Mods.D2k/Activities/SwallowActor.cs +++ b/OpenRA.Mods.D2k/Activities/SwallowActor.cs @@ -61,7 +61,7 @@ namespace OpenRA.Mods.D2k.Activities if ((location - targetLocation).Length > NearEnough) return false; - var lunch = worm.World.ActorMap.GetUnitsAt(targetLocation) + var lunch = worm.World.ActorMap.GetActorsAt(targetLocation) .Where(t => !t.Equals(worm) && weapon.IsValidAgainst(t, worm)); if (!lunch.Any()) diff --git a/OpenRA.Mods.RA/Activities/LayMines.cs b/OpenRA.Mods.RA/Activities/LayMines.cs index 1c26a4bc2d..556772ce37 100644 --- a/OpenRA.Mods.RA/Activities/LayMines.cs +++ b/OpenRA.Mods.RA/Activities/LayMines.cs @@ -85,7 +85,7 @@ namespace OpenRA.Mods.RA.Activities static bool ShouldLayMine(Actor self, CPos p) { // If there is no unit (other than me) here, we want to place a mine here - return self.World.ActorMap.GetUnitsAt(p).All(a => a == self); + return self.World.ActorMap.GetActorsAt(p).All(a => a == self); } void LayMine(Actor self) diff --git a/OpenRA.Mods.RA/Activities/Leap.cs b/OpenRA.Mods.RA/Activities/Leap.cs index 4155c91b5d..4d2875a4f0 100644 --- a/OpenRA.Mods.RA/Activities/Leap.cs +++ b/OpenRA.Mods.RA/Activities/Leap.cs @@ -63,7 +63,7 @@ namespace OpenRA.Mods.RA.Activities mobile.FinishedMoving(self); mobile.IsMoving = false; - self.World.ActorMap.GetUnitsAt(mobile.ToCell, mobile.ToSubCell) + self.World.ActorMap.GetActorsAt(mobile.ToCell, mobile.ToSubCell) .Except(new[] { self }).Where(t => weapon.IsValidAgainst(t, self)) .Do(t => t.Kill(self)); diff --git a/OpenRA.Mods.RA/Traits/SupportPowers/ChronoshiftPower.cs b/OpenRA.Mods.RA/Traits/SupportPowers/ChronoshiftPower.cs index de66933d82..91325dd111 100644 --- a/OpenRA.Mods.RA/Traits/SupportPowers/ChronoshiftPower.cs +++ b/OpenRA.Mods.RA/Traits/SupportPowers/ChronoshiftPower.cs @@ -62,7 +62,7 @@ namespace OpenRA.Mods.RA.Traits var tiles = Self.World.Map.FindTilesInCircle(xy, range); var units = new HashSet(); foreach (var t in tiles) - units.UnionWith(Self.World.ActorMap.GetUnitsAt(t)); + units.UnionWith(Self.World.ActorMap.GetActorsAt(t)); return units.Where(a => a.Info.HasTraitInfo() && !a.TraitsImplementing().Any(condition => condition.PreventsTeleport(a)));