From 49b35dca6ed61224284ce06cb20b630a7c8c248b Mon Sep 17 00:00:00 2001 From: reaperrr Date: Sun, 27 Apr 2014 22:56:23 +0200 Subject: [PATCH] Add UseInfantryDeath option to RenderInfantry trait. This allows the use of RenderInfantry for units that do not have a Die voice or die sequences. Additionally fixed Wolverine stand and shoot sequences. --- OpenRA.Mods.RA/Render/RenderInfantry.cs | 10 ++++++++-- mods/ts/rules/vehicles.yaml | 2 ++ mods/ts/sequences/vehicles.yaml | 11 ++++++----- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/OpenRA.Mods.RA/Render/RenderInfantry.cs b/OpenRA.Mods.RA/Render/RenderInfantry.cs index bfbc1e76e0..515cbe59d2 100644 --- a/OpenRA.Mods.RA/Render/RenderInfantry.cs +++ b/OpenRA.Mods.RA/Render/RenderInfantry.cs @@ -18,6 +18,7 @@ namespace OpenRA.Mods.RA.Render { public readonly int MinIdleWaitTicks = 30; public readonly int MaxIdleWaitTicks = 110; + public readonly bool UseInfantryDeath = true; public readonly string[] IdleAnimations = { }; public readonly string[] StandAnimations = { "stand" }; @@ -130,8 +131,13 @@ namespace OpenRA.Mods.RA.Render if (e.Warhead == null) return; - Sound.PlayVoice("Die", self, self.Owner.Country.Race); - SpawnCorpse(self, "die{0}".F(e.Warhead.InfDeath)); + // TODO: Possibly move Die sound out of this Render trait entirely + if (info.UseInfantryDeath == true) + { + Sound.PlayVoice("Die", self, self.Owner.Country.Race); + SpawnCorpse(self, "die{0}".F(e.Warhead.InfDeath)); + } + } public void SpawnCorpse(Actor self, string sequence) diff --git a/mods/ts/rules/vehicles.yaml b/mods/ts/rules/vehicles.yaml index 9779e8e200..c2d00e4318 100644 --- a/mods/ts/rules/vehicles.yaml +++ b/mods/ts/rules/vehicles.yaml @@ -480,6 +480,7 @@ MMCH: RevealsShroud: Range: 8c0 RenderInfantry: + UseInfantryDeath: false Turreted: AttackTurreted: WithTurret: @@ -549,6 +550,7 @@ SMECH: Armament: Weapon: AssaultCannon RenderInfantry: + UseInfantryDeath: false Selectable: Voices: Mech diff --git a/mods/ts/sequences/vehicles.yaml b/mods/ts/sequences/vehicles.yaml index 113219f6de..00ce6acd8c 100644 --- a/mods/ts/sequences/vehicles.yaml +++ b/mods/ts/sequences/vehicles.yaml @@ -117,19 +117,20 @@ gghunt: Start: 0 smech: - stand: # TODO: slightly glitchy - Start: 0 - Facings: 8 - ShadowStart: 136 + stand: + Start: 96 + Facings: -8 + ShadowStart: 232 run: Start: 0 Facings: -8 Length: 12 ShadowStart: 136 - shoot: # TODO: played somehow too fast + shoot: Start: 104 Length: 4 Facings: -8 ShadowStart: 240 + Tick: 100 icon: smchicon Start: 0 \ No newline at end of file