diff --git a/OpenRa.Game/OpenRa.Game.csproj b/OpenRa.Game/OpenRa.Game.csproj index 2575a4c6a0..1759394327 100644 --- a/OpenRa.Game/OpenRa.Game.csproj +++ b/OpenRa.Game/OpenRa.Game.csproj @@ -143,6 +143,7 @@ + diff --git a/OpenRa.Game/Traits/RenderUnitRotor.cs b/OpenRa.Game/Traits/RenderUnitRotor.cs new file mode 100755 index 0000000000..18af28651b --- /dev/null +++ b/OpenRa.Game/Traits/RenderUnitRotor.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using IjwFramework.Types; +using OpenRa.Game.Graphics; + +namespace OpenRa.Game.Traits +{ + class RenderUnitRotor : RenderUnit + { + public Animation rotorAnim; + + public RenderUnitRotor( Actor self ) + : base(self) + { + rotorAnim = new Animation(self.unitInfo.Name); + rotorAnim.PlayRepeating("rotor"); + } + + public override IEnumerable> Render(Actor self) + { + var mobile = self.traits.Get(); + + yield return Util.Centered(anim.Image, self.CenterLocation); + yield return Util.Centered(rotorAnim.Image, self.CenterLocation + + Util.GetTurretPosition(self, self.unitInfo.PrimaryOffset, 0)); + if (self.unitInfo.SecondaryOffset != null) + yield return Util.Centered(rotorAnim.Image, self.CenterLocation + + Util.GetTurretPosition(self, self.unitInfo.SecondaryOffset, 0)); + } + + public override void Tick(Actor self) + { + base.Tick(self); + rotorAnim.Tick(); + } + } +} diff --git a/rules.ini b/rules.ini index e98a31e19f..c14b33dddf 100644 --- a/rules.ini +++ b/rules.ini @@ -1162,7 +1162,7 @@ Armor=light TechLevel=11 Sight=0 Speed=12 -Owner=soviet +Owner=allies Cost=1200 Points=35 ROT=5 @@ -1195,7 +1195,7 @@ Armor=heavy TechLevel=9 Sight=0 Speed=12 -Owner=soviet +Owner=allies Cost=1200 Points=40 ROT=4 @@ -1457,7 +1457,7 @@ Strength=800 Armor=wood TechLevel=9 Sight=5 -Owner=allies,soviet +Owner=allies Cost=1500 Points=70 Power=-10 diff --git a/sequences.xml b/sequences.xml index 85f6a62814..fd2e022fb9 100644 --- a/sequences.xml +++ b/sequences.xml @@ -1,4 +1,4 @@ - +