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.
This commit is contained in:
reaperrr
2014-04-27 22:56:23 +02:00
parent 7517cbb941
commit 49b35dca6e
3 changed files with 16 additions and 7 deletions

View File

@@ -18,6 +18,7 @@ namespace OpenRA.Mods.RA.Render
{ {
public readonly int MinIdleWaitTicks = 30; public readonly int MinIdleWaitTicks = 30;
public readonly int MaxIdleWaitTicks = 110; public readonly int MaxIdleWaitTicks = 110;
public readonly bool UseInfantryDeath = true;
public readonly string[] IdleAnimations = { }; public readonly string[] IdleAnimations = { };
public readonly string[] StandAnimations = { "stand" }; public readonly string[] StandAnimations = { "stand" };
@@ -130,8 +131,13 @@ namespace OpenRA.Mods.RA.Render
if (e.Warhead == null) if (e.Warhead == null)
return; return;
Sound.PlayVoice("Die", self, self.Owner.Country.Race); // TODO: Possibly move Die sound out of this Render trait entirely
SpawnCorpse(self, "die{0}".F(e.Warhead.InfDeath)); 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) public void SpawnCorpse(Actor self, string sequence)

View File

@@ -480,6 +480,7 @@ MMCH:
RevealsShroud: RevealsShroud:
Range: 8c0 Range: 8c0
RenderInfantry: RenderInfantry:
UseInfantryDeath: false
Turreted: Turreted:
AttackTurreted: AttackTurreted:
WithTurret: WithTurret:
@@ -549,6 +550,7 @@ SMECH:
Armament: Armament:
Weapon: AssaultCannon Weapon: AssaultCannon
RenderInfantry: RenderInfantry:
UseInfantryDeath: false
Selectable: Selectable:
Voices: Mech Voices: Mech

View File

@@ -117,19 +117,20 @@ gghunt:
Start: 0 Start: 0
smech: smech:
stand: # TODO: slightly glitchy stand:
Start: 0 Start: 96
Facings: 8 Facings: -8
ShadowStart: 136 ShadowStart: 232
run: run:
Start: 0 Start: 0
Facings: -8 Facings: -8
Length: 12 Length: 12
ShadowStart: 136 ShadowStart: 136
shoot: # TODO: played somehow too fast shoot:
Start: 104 Start: 104
Length: 4 Length: 4
Facings: -8 Facings: -8
ShadowStart: 240 ShadowStart: 240
Tick: 100
icon: smchicon icon: smchicon
Start: 0 Start: 0