unit idle tracking via dummy activity; wasn't so bad.

This commit is contained in:
Chris Forbes
2009-12-28 08:26:13 +13:00
parent 47f4815205
commit b7bac5bd16
11 changed files with 83 additions and 48 deletions

View File

@@ -59,7 +59,7 @@ namespace OpenRa.Game.Traits.Activities
if( move != null )
{
move.TickMove( self, mobile, this );
return null;
return this;
}
if( destination == self.Location )
@@ -74,14 +74,14 @@ namespace OpenRa.Game.Traits.Activities
if( path.Count == 0 )
{
destination = mobile.toCell;
return null;
return this;
}
destination = path[ 0 ];
var nextCell = PopPath( self, mobile );
if( nextCell == null )
return null;
return NextActivity;
int2 dir = nextCell.Value - mobile.fromCell;
var firstFacing = Util.GetFacing( dir, unit.Facing );
@@ -103,7 +103,7 @@ namespace OpenRa.Game.Traits.Activities
move.TickMove( self, mobile, this );
return null;
return this;
}
}