From e35e93557c71a8a28ebf4f1902730359a45bc827 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 17 Dec 2017 12:32:19 +0000 Subject: [PATCH] Remove obsolete NearestCellTo helper. --- OpenRA.Game/Traits/TraitsInterfaces.cs | 20 -------------------- 1 file changed, 20 deletions(-) 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 {