Perf fixes for low unit-counts. Added sanity checks - not enabled by default.

This commit is contained in:
Bob
2009-10-28 19:43:04 +13:00
parent 9f237f2530
commit cc1be5b31c
4 changed files with 45 additions and 25 deletions

View File

@@ -21,7 +21,8 @@ namespace OpenRa.Game.Traits
public Mobile(Actor self)
{
this.self = self;
fromCell = toCell;
fromCell = toCell;
Game.UnitInfluence.Update( this );
}
public void QueueActivity( CurrentActivity nextActivity )
@@ -205,7 +206,7 @@ namespace OpenRa.Game.Traits
var nextCell = path[ path.Count - 1 ];
if( !CanEnterCell( nextCell, self ) )
{
if( ( mobile.toCell - destination.Value ).LengthSquared < 4 )
if( ( mobile.toCell - destination.Value ).LengthSquared <= 8 )
{
path.Clear();
return null;