Merge pull request #10270 from RoosterDragon/less-samples
Remove some unneeded PerfSamples
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,13 +32,10 @@ namespace OpenRA
|
||||
|
||||
public static IEnumerable<Actor> 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<T>(this IEnumerable<T> e, Action<T> a, string text)
|
||||
|
||||
Reference in New Issue
Block a user