move ROT, InitialFacing and Speed to Mobile and Aircraft.

This commit is contained in:
alzeih
2010-07-31 02:05:54 +12:00
parent dd7008d7ee
commit 33b6f590e9
21 changed files with 144 additions and 82 deletions

View File

@@ -59,15 +59,11 @@ namespace OpenRA.Traits
public override float MovementSpeedForCell(Actor self, int2 cell)
{
var unitInfo = self.Info.Traits.GetOrDefault<UnitInfo>();
if( unitInfo == null )
return 0f;
var modifier = self.traits
.WithInterface<ISpeedModifier>()
.Select(t => t.GetSpeedModifier())
.Product();
return unitInfo.Speed * modifier;
return Info.Speed * modifier;
}
public override IEnumerable<int2> OccupiedCells()