moving Actor.Location onto the appropriate traits (bob)

This commit is contained in:
Chris Forbes
2010-06-19 14:37:06 +12:00
parent db465e1fdd
commit 66adbee2a6
25 changed files with 218 additions and 103 deletions

View File

@@ -50,6 +50,7 @@ namespace OpenRA.Mods.RA.Activities
return NextActivity;
var unit = self.traits.Get<Unit>();
var aircraft = self.traits.Get<Aircraft>();
if (unit.Altitude > 0)
--unit.Altitude;
@@ -60,7 +61,7 @@ namespace OpenRA.Mods.RA.Activities
var angle = unit.Facing / 128f * Math.PI;
self.CenterLocation += speed * -float2.FromAngle((float)angle);
self.Location = ((1 / 24f) * self.CenterLocation).ToInt2();
aircraft.Location = ((1 / 24f) * self.CenterLocation).ToInt2();
return this;
}