diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index bcba7f4ccb..860d633d8b 100644 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -207,26 +207,6 @@ namespace OpenRA.Traits Pair[] OccupiedCells(); } - public static class IOccupySpaceExts - { - public static CPos NearestCellTo(this IOccupySpace ios, CPos other) - { - var nearest = ios.TopLeft; - var nearestDistance = int.MaxValue; - foreach (var cell in ios.OccupiedCells()) - { - var dist = (other - cell.First).LengthSquared; - if (dist < nearestDistance) - { - nearest = cell.First; - nearestDistance = dist; - } - } - - return nearest; - } - } - public enum SubCell { Invalid = int.MinValue, Any = int.MinValue / 2, FullCell = 0, First = 1 } public interface IActorMap {