From ebc6515d7387fc0fbb12b89d5e0b1601812a69f6 Mon Sep 17 00:00:00 2001 From: Squiggles211 Date: Sun, 6 Jul 2014 00:52:43 -0500 Subject: [PATCH] Fixes #5054 by removing chinook's turn before landing and increasing ascend/descend speed Allows for any helicopter to enable or disable the turn before landing but sets it to default off for the chinook. (may be desireable for single player missions visual effect like Allies01?) Also gives the chinook a faster ascend/descend speed. Fixes #5054 --- OpenRA.Mods.RA/Air/Helicopter.cs | 15 +++++++++++++-- mods/cnc/rules/aircraft.yaml | 1 + mods/ra/rules/aircraft.yaml | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.RA/Air/Helicopter.cs b/OpenRA.Mods.RA/Air/Helicopter.cs index 1ed2a8bbf1..2d416bef2a 100755 --- a/OpenRA.Mods.RA/Air/Helicopter.cs +++ b/OpenRA.Mods.RA/Air/Helicopter.cs @@ -19,8 +19,15 @@ namespace OpenRA.Mods.RA.Air class HelicopterInfo : AircraftInfo, IMoveInfo { public readonly WRange IdealSeparation = new WRange(1706); + + [Desc("Allow the helicopter land after it has no more commands.")] public readonly bool LandWhenIdle = true; + + [Desc("Allow the helicopter turn before landing.")] + public readonly bool TurnToLand = false; public readonly WRange LandAltitude = WRange.Zero; + + [Desc("How fast the helicopter ascends or descends.")] public readonly WRange AltitudeVelocity = new WRange(43); public override object Create(ActorInitializer init) { return new Helicopter(init, this); } @@ -59,7 +66,9 @@ namespace OpenRA.Mods.RA.Air if (Info.LandWhenIdle) { - self.QueueActivity(new Turn(Info.InitialFacing)); + if (Info.TurnToLand) + self.QueueActivity(new Turn(Info.InitialFacing)); + self.QueueActivity(new HeliLand(true)); } } @@ -103,7 +112,9 @@ namespace OpenRA.Mods.RA.Air if (Info.LandWhenIdle) { - self.QueueActivity(new Turn(Info.InitialFacing)); + if (Info.TurnToLand) + self.QueueActivity(new Turn(Info.InitialFacing)); + self.QueueActivity(new HeliLand(true)); } } diff --git a/mods/cnc/rules/aircraft.yaml b/mods/cnc/rules/aircraft.yaml index 6839c9bd6a..d229b496d4 100644 --- a/mods/cnc/rules/aircraft.yaml +++ b/mods/cnc/rules/aircraft.yaml @@ -17,6 +17,7 @@ TRAN: Speed: 140 InitialFacing: 0 LandableTerrainTypes: Clear,Rough,Road,Ore,Beach,Tiberium,BlueTiberium + AltitudeVelocity: 0c100 Health: HP: 90 Armor: diff --git a/mods/ra/rules/aircraft.yaml b/mods/ra/rules/aircraft.yaml index c228237611..adc028ab8a 100644 --- a/mods/ra/rules/aircraft.yaml +++ b/mods/ra/rules/aircraft.yaml @@ -206,6 +206,7 @@ TRAN: ROT: 5 Speed: 112 LandableTerrainTypes: Clear,Rough,Road,Ore,Beach + AltitudeVelocity: 0c100 RenderUnit: WithRotor@PRIMARY: Offset: -597,0,341