From 9b0f11bd8922491bf2c2a9b4422d59982b227564 Mon Sep 17 00:00:00 2001 From: Shane Handley Date: Mon, 2 Mar 2020 03:40:12 +0900 Subject: [PATCH] Do that better, and add a TODO. --- .../src/audio/sfx/event_mapper/movement/mod.rs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/voxygen/src/audio/sfx/event_mapper/movement/mod.rs b/voxygen/src/audio/sfx/event_mapper/movement/mod.rs index 77c2067177..2ec4194788 100644 --- a/voxygen/src/audio/sfx/event_mapper/movement/mod.rs +++ b/voxygen/src/audio/sfx/event_mapper/movement/mod.rs @@ -157,14 +157,21 @@ impl MovementEventMapper { { if let Some(wield_event) = match ( previous_event.weapon_drawn, - current_event.action.is_roll(), Self::has_weapon_drawn(current_event.action), ) { - (false, false, true) => Some(SfxEvent::Wield(kind)), - (true, false, false) => Some(SfxEvent::Unwield(kind)), + (false, true) => Some(SfxEvent::Wield(kind)), + (true, false) => Some(SfxEvent::Unwield(kind)), _ => None, } { - return wield_event; + // We don't want wield/unwield sfx when we begin and end rolling, because when + // the players rolls repeatedly they trigger too frequently + // @TODO maybe re-enable these when we have a solid way to cancel them in the + // above scenario + if current_event.action.is_roll() { + return None; + } else { + return wield_event; + } } }