Merge pull request #10156 from abcdefg30/deathSoundsAny

Fix DeathSounds not working without DeathTypes defined
This commit is contained in:
Oliver Brakmann
2015-12-05 18:16:50 +01:00

View File

@@ -41,11 +41,8 @@ namespace OpenRA.Mods.Common.Traits
{
var warhead = e.Warhead as DamageWarhead;
// Killed by some non-standard means
if (warhead == null)
return;
if (warhead.DamageTypes.Overlaps(info.DeathTypes))
// If the warhead is null, the actor was killed by some non-standard means
if (info.DeathTypes.Count == 0 || (warhead != null && warhead.DamageTypes.Overlaps(info.DeathTypes)))
self.PlayVoiceLocal(info.Voice, info.VolumeMultiplier);
}
}