remove unnecessary parameters from Aircraft.MovementSpeedForCell, and rename to MovementSpeed

This commit is contained in:
Bob
2010-11-04 00:43:18 +13:00
committed by Chris Forbes
parent 8129d5d7dc
commit 5c0cd50797
7 changed files with 17 additions and 14 deletions

View File

@@ -80,14 +80,17 @@ namespace OpenRA.Mods.RA
}
public bool CanEnterCell(int2 location) { return true; }
public float MovementSpeedForCell(Actor self, int2 cell)
{
var modifier = self
.TraitsImplementing<ISpeedModifier>()
.Select(t => t.GetSpeedModifier())
.Product();
return Info.Speed * modifier;
public float MovementSpeed
{
get
{
var modifier = self
.TraitsImplementing<ISpeedModifier>()
.Select( t => t.GetSpeedModifier() )
.Product();
return Info.Speed * modifier;
}
}
int2[] noCells = new int2[] { };