having a look at this perf stuff...

This commit is contained in:
Chris Forbes
2010-03-28 10:34:43 +13:00
parent e1f6a741b8
commit 6b7d824b9b
7 changed files with 33 additions and 17 deletions

View File

@@ -50,6 +50,8 @@ namespace OpenRA
{
using (new PerfSample("find_unit_path"))
{
Game.Debug("FindUnitPath {0} -> {1}".F(from, target));
var pb = FindBidiPath(
PathSearch.FromPoint(world, target, from, umt, false).WithCustomBlocker(AvoidUnitsNear(from, 4)),
PathSearch.FromPoint(world, from, target, umt, false).WithCustomBlocker(AvoidUnitsNear(from, 4)));
@@ -61,7 +63,7 @@ namespace OpenRA
public List<int2> FindUnitPathToRange( int2 src, int2 target, UnitMovementType umt, int range )
{
using( new PerfSample( "find_unit_path_multiple_src" ) )
//using( new PerfSample( "find_unit_path_multiple_src" ) )
{
var tilesInRange = world.FindTilesInCircle(target, range)
.Where( t => world.IsPathableCell( t, umt ) );
@@ -82,7 +84,7 @@ namespace OpenRA
public List<int2> FindPath( PathSearch search )
{
using (new PerfSample("find_path_inner"))
//using (new PerfSample("find_path_inner"))
{
while (!search.queue.Empty)
{