From 642e213049b7b9b3be9e5f50e561ad60fb4bdf71 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Fri, 4 Dec 2015 22:06:16 +0100 Subject: [PATCH] Fix DeathSounds not working without DeathTypes defined --- OpenRA.Mods.Common/Traits/Sound/DeathSounds.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/Sound/DeathSounds.cs b/OpenRA.Mods.Common/Traits/Sound/DeathSounds.cs index 9d75ba2098..bc16292fb1 100644 --- a/OpenRA.Mods.Common/Traits/Sound/DeathSounds.cs +++ b/OpenRA.Mods.Common/Traits/Sound/DeathSounds.cs @@ -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); } }