diff --git a/OpenRa.Game/GameRules/UnitInfo.cs b/OpenRa.Game/GameRules/UnitInfo.cs index 180fca4d71..eb7e0d1ad2 100755 --- a/OpenRa.Game/GameRules/UnitInfo.cs +++ b/OpenRa.Game/GameRules/UnitInfo.cs @@ -43,6 +43,8 @@ namespace OpenRa.Game.GameRules public readonly string[] BuiltAt = { }; public readonly int[] PrimaryOffset = { 0, 0 }; public readonly int[] SecondaryOffset = null; + public readonly int[] RotorOffset = { 0, 0 }; + public readonly int[] RotorOffset2 = null; public readonly int Recoil = 0; public readonly bool MuzzleFlash = false; public readonly int SelectionPriority = 10; diff --git a/OpenRa.Game/Traits/RenderUnitRotor.cs b/OpenRa.Game/Traits/RenderUnitRotor.cs index ca8438e9c5..322345bc71 100755 --- a/OpenRa.Game/Traits/RenderUnitRotor.cs +++ b/OpenRa.Game/Traits/RenderUnitRotor.cs @@ -16,16 +16,16 @@ namespace OpenRa.Game.Traits rotorAnim.PlayRepeating("rotor"); anims.Add( "rotor_1", new AnimationWithOffset( rotorAnim, - () => Util.GetTurretPosition( self, unit, self.Info.PrimaryOffset, 0 ), + () => Util.GetTurretPosition( self, unit, self.Info.RotorOffset, 0 ), null ) ); - if( self.Info.SecondaryOffset == null ) return; + if (self.Info.RotorOffset2 == null) return; secondRotorAnim = new Animation( self.Info.Name ); secondRotorAnim.PlayRepeating( "rotor2" ); anims.Add( "rotor_2", new AnimationWithOffset( secondRotorAnim, - () => Util.GetTurretPosition( self, unit, self.Info.SecondaryOffset, 0 ), + () => Util.GetTurretPosition(self, unit, self.Info.RotorOffset2, 0), null ) ); } diff --git a/units.ini b/units.ini index 557e102dd7..9a2c56233e 100644 --- a/units.ini +++ b/units.ini @@ -176,8 +176,8 @@ InitialFacing=192 LongDesc=Anti-Tanks & Anti-Infantry Plane.\n Strong vs Infantry, Tanks\n Weak vs Buildings [TRAN] Description=Transport Helicopter -PrimaryOffset=0,14,0,-4 -SecondaryOffset=0,-14,0,-2 +RotorOffset=0,14,0,-4 +RotorOffset2=0,-14,0,-2 BuiltAt=hpad Traits=Unit, Helicopter, RenderUnitRotor, WithShadow InitialFacing=20 @@ -186,13 +186,17 @@ LongDesc=Fast Infantry Transport Helicopter.\n Unarmed Description=Longbow BuiltAt=hpad Traits=Unit, AttackHeli, Helicopter, RenderUnitRotor, WithShadow, LimitedAmmo -PrimaryOffset=0,0,0,-2 +RotorOffset=0,0,0,-2 +PrimaryOffset=-5,0,0,2 +SecondaryOffset=5,0,0,2 InitialFacing=20 LongDesc=Helicopter Gunship with AG Missiles.\n Strong vs Buildings, Tanks\n Weak vs Infantry [HIND] Description=Hind BuiltAt=hpad Traits=Unit, AttackHeli, Helicopter, RenderUnitRotor, WithShadow, LimitedAmmo +PrimaryOffset=-5,0,0,2 +SecondaryOffset=5,0,0,2 InitialFacing=20 LongDesc=Helicopter Gunship with Chainguns.\n Strong vs Infantry, Light Vehicles.\n Weak vs Tanks