From 9ea79ff80f6927ce9381f75e5862c6b6325e76e8 Mon Sep 17 00:00:00 2001 From: hut Date: Thu, 11 Apr 2024 20:58:16 +0200 Subject: [PATCH] death animation fallback --- src/actor.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/actor.rs b/src/actor.rs index 80b04a4..9e35787 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -446,13 +446,6 @@ fn handle_player_death( duration: 4.0, }); } - DamageType::Trauma => { - ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::WakeUp)); - ew_effect.send(effects::SpawnEffectEvent { - class: effects::Effects::FadeIn(Color::MAROON), - duration: 1.0, - }); - } DamageType::Asphyxiation => { ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::WakeUp)); ew_effect.send(effects::SpawnEffectEvent { @@ -460,7 +453,12 @@ fn handle_player_death( duration: 1.0, }); } - _ => { + DamageType::Trauma | _ => { + ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::WakeUp)); + ew_effect.send(effects::SpawnEffectEvent { + class: effects::Effects::FadeIn(Color::MAROON), + duration: 1.0, + }); } }