Add IdleTurnSpeed to Aircraft

Instead of hardcoding 1/3 of normal TurnSpeed on HeliFlyCircle.
This commit is contained in:
reaperrr
2018-11-18 17:30:08 +01:00
committed by Paul Chote
parent 1553a8a5cb
commit d8220b390a
9 changed files with 79 additions and 10 deletions

View File

@@ -33,9 +33,13 @@ namespace OpenRA.Mods.Common.Traits
busy = false;
FindCarryableForTransport(self);
// TODO: This should be handled by the aircraft trait
// TODO: This should be handled by the Aircraft trait
if (!busy)
self.QueueActivity(new HeliFlyCircle(self));
{
var aircraft = self.Trait<Aircraft>();
var turnSpeedOverride = aircraft.Info.IdleTurnSpeed > -1 ? aircraft.Info.IdleTurnSpeed : aircraft.TurnSpeed;
self.QueueActivity(new HeliFlyCircle(self, turnSpeedOverride));
}
}
// A carryable notifying us that he'd like to be carried