add IHasLocation

This commit is contained in:
Bob
2010-10-08 19:10:31 +13:00
committed by Chris Forbes
parent 9c362f7d41
commit 011a20e8b4
31 changed files with 133 additions and 107 deletions

View File

@@ -139,11 +139,11 @@ namespace OpenRA.Mods.RA
.Select(h => self.Trait<Helicopter>().GetRepulseForce(self, h))
.Aggregate(float2.Zero, (a, b) => a + b);
self.CenterLocation += rawSpeed * f;
aircraft.center += rawSpeed * f;
if (--offsetTicks <= 0)
{
self.CenterLocation += Info.InstabilityMagnitude * self.World.SharedRandom.Gauss2D(5);
aircraft.center += Info.InstabilityMagnitude * self.World.SharedRandom.Gauss2D(5);
aircraft.Altitude += (int)(Info.InstabilityMagnitude * self.World.SharedRandom.Gauss1D(5));
offsetTicks = Info.InstabilityTicks;
}