diff --git a/OpenRA.Game/Network/Connection.cs b/OpenRA.Game/Network/Connection.cs index 28c9317d05..8a6d02c155 100644 --- a/OpenRA.Game/Network/Connection.cs +++ b/OpenRA.Game/Network/Connection.cs @@ -14,7 +14,6 @@ using System.IO; using System.Net.Sockets; using System.Threading; using OpenRA.Server; -using OpenRA.Support; namespace OpenRA.Network { @@ -212,12 +211,6 @@ namespace OpenRA.Network if (socket != null) socket.Client.Close(); - using (new PerfSample("Thread.Join")) - { - if (!t.Join(1000)) - return; - } - base.Dispose(disposing); } diff --git a/OpenRA.Game/WorldUtils.cs b/OpenRA.Game/WorldUtils.cs index b015fd35ae..c86e4d7919 100644 --- a/OpenRA.Game/WorldUtils.cs +++ b/OpenRA.Game/WorldUtils.cs @@ -32,13 +32,10 @@ namespace OpenRA public static IEnumerable FindActorsInCircle(this World world, WPos origin, WDist r) { - using (new PerfSample("FindUnitsInCircle")) - { - // Target ranges are calculated in 2D, so ignore height differences - var vec = new WVec(r, r, WDist.Zero); - return world.ActorMap.ActorsInBox(origin - vec, origin + vec).Where( - a => (a.CenterPosition - origin).HorizontalLengthSquared <= r.LengthSquared); - } + // Target ranges are calculated in 2D, so ignore height differences + var vec = new WVec(r, r, WDist.Zero); + return world.ActorMap.ActorsInBox(origin - vec, origin + vec).Where( + a => (a.CenterPosition - origin).HorizontalLengthSquared <= r.LengthSquared); } public static void DoTimed(this IEnumerable e, Action a, string text)