Missed a file when unmangling a dirty rebase.

This commit is contained in:
Paul Chote
2011-01-07 20:33:14 +13:00
parent 9f38df013e
commit e46b00f9c4

View File

@@ -130,22 +130,22 @@ namespace OpenRA.Mods.RA.Air
.Where(a => a.HasTrait<Helicopter>()); .Where(a => a.HasTrait<Helicopter>());
var f = otherHelis var f = otherHelis
.Select(h => GetRepulseForce(self, h, h.Trait<Helicopter>())) .Select(h => GetRepulseForce(self, h))
.Aggregate(int2.Zero, (a, b) => a + b); .Aggregate(int2.Zero, (a, b) => a + b);
int RepulsionFacing = Util.GetFacing( f.ToFloat2(), -1 ); int RepulsionFacing = Util.GetFacing( f, -1 );
if( RepulsionFacing != -1 ) if( RepulsionFacing != -1 )
aircraft.TickMove( 1024 * aircraft.MovementSpeed, RepulsionFacing ); aircraft.TickMove( 1024 * aircraft.MovementSpeed, RepulsionFacing );
} }
// Returns an int2 in subPx units // Returns an int2 in subPx units
public int2 GetRepulseForce(Actor self, Actor h, Aircraft hAir) public int2 GetRepulseForce(Actor self, Actor h)
{ {
if (self == h) if (self == h)
return int2.Zero; return int2.Zero;
if( hAir.Altitude < Altitude ) if( h.Trait<Helicopter>().Altitude < Altitude )
return int2.Zero; return int2.Zero;
var d = (self.CenterLocation - h.CenterLocation).ToInt2(); var d = self.CenterLocation - h.CenterLocation;
if (d.Length > Info.IdealSeparation) if (d.Length > Info.IdealSeparation)
return int2.Zero; return int2.Zero;