Perf fixes for low unit-counts. Added sanity checks - not enabled by default.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user