Drags death sounds out of RenderInfantry into a separate DeathSounds trait.
Play death sounds with a new PlayVoiceLocal so they don't use full volume regardless of position relative to camera. Adds option for alternative burn and zap death sounds. Renames RenderInfantry's UseInfantryDeath trait to SpawnsCorpse. Removes hack from ra desert shellmap.
This commit is contained in:
@@ -18,7 +18,7 @@ namespace OpenRA.Mods.RA.Render
|
||||
{
|
||||
public readonly int MinIdleWaitTicks = 30;
|
||||
public readonly int MaxIdleWaitTicks = 110;
|
||||
public readonly bool UseInfantryDeath = true;
|
||||
public readonly bool SpawnsCorpse = true;
|
||||
public readonly string[] IdleAnimations = { };
|
||||
public readonly string[] StandAnimations = { "stand" };
|
||||
|
||||
@@ -125,19 +125,17 @@ namespace OpenRA.Mods.RA.Render
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Possibly move this into a separate trait
|
||||
public void Killed(Actor self, AttackInfo e)
|
||||
{
|
||||
// Killed by some non-standard means
|
||||
if (e.Warhead == null)
|
||||
return;
|
||||
|
||||
// TODO: Possibly move Die sound out of this Render trait entirely
|
||||
if (info.UseInfantryDeath == true)
|
||||
if (info.SpawnsCorpse)
|
||||
{
|
||||
Sound.PlayVoice("Die", self, self.Owner.Country.Race);
|
||||
SpawnCorpse(self, "die{0}".F(e.Warhead.InfDeath));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void SpawnCorpse(Actor self, string sequence)
|
||||
|
||||
Reference in New Issue
Block a user