Shift movement cost/speed into IMove; regressions in a few areas

This commit is contained in:
Paul Chote
2010-06-25 17:05:56 +12:00
parent 6a5869f2c6
commit 29fa9e3aeb
20 changed files with 178 additions and 132 deletions

View File

@@ -110,7 +110,8 @@ namespace OpenRA.Mods.RA
return;
var Info = self.Info.Traits.Get<HelicopterInfo>();
var rawSpeed = .2f * Util.GetEffectiveSpeed(self, UnitMovementType.Fly);
var mobile = self.traits.WithInterface<IMove>().FirstOrDefault();
var rawSpeed = .2f * mobile.MovementSpeedForCell(self, self.Location);
var otherHelis = self.World.FindUnitsInCircle(self.CenterLocation, Info.IdealSeparation)
.Where(a => a.traits.Contains<Helicopter>());