Moved ROT from Mobile/Heli/Plane to Unit.

This commit is contained in:
Bob
2010-01-12 21:11:38 +13:00
parent 06969138aa
commit 901d48edfa
14 changed files with 29 additions and 25 deletions

View File

@@ -41,7 +41,7 @@ namespace OpenRa.Game.Traits.Activities
var unit = self.traits.Get<Unit>();
var speed = .2f * Util.GetEffectiveSpeed(self);
var approachStart = landPos - new float2(unit.Altitude * speed, 0);
var turnRadius = (128f / self.Info.Traits.Get<PlaneInfo>().ROT) * speed / (float)Math.PI;
var turnRadius = (128f / self.Info.Traits.Get<UnitInfo>().ROT) * speed / (float)Math.PI;
/* work out the center points */
var fwd = -float2.FromAngle(unit.Facing / 128f * (float)Math.PI);