From 87f5a3345d0e901b996410ed9a495f52385759cb Mon Sep 17 00:00:00 2001 From: James Melkonian Date: Tue, 7 Feb 2023 16:57:22 +0000 Subject: [PATCH] Fix sword sfx --- CHANGELOG.md | 1 + assets/voxygen/audio/sfx.ron | 60 ++++++++++++++++++++++++++++-------- common/src/comp/ability.rs | 19 ++++++++---- 3 files changed, 62 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a8ed6d0e5..72b3084000 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Stat diff now displays correctly for armor - Lamps, embers and campfires use glowing indices - Non-potion drinks no longer heal as much as potions. +- Added SFX to the new sword abilities ## [0.14.0] - 2023-01-07 diff --git a/assets/voxygen/audio/sfx.ron b/assets/voxygen/audio/sfx.ron index b1a7b0b9c7..b48df9bebc 100644 --- a/assets/voxygen/audio/sfx.ron +++ b/assets/voxygen/audio/sfx.ron @@ -306,6 +306,54 @@ ], threshold: 0.5, ), + Attack(ComboMelee2(Action), Sword): ( + files: [ + "voxygen.audio.sfx.abilities.swing_sword", + ], + threshold: 0.7, + ), + Attack(FinisherMelee(Action), Sword): ( + files: [ + "voxygen.audio.sfx.abilities.swing_sword", + ], + threshold: 0.7, + ), + Attack(DiveMelee(Action), Sword): ( + files: [ + "voxygen.audio.sfx.abilities.swing_sword", + ], + threshold: 0.7, + ), + Attack(RiposteMelee(Action), Sword): ( + files: [ + "voxygen.audio.sfx.abilities.swing_sword", + ], + threshold: 0.7, + ), + Attack(RapidMelee(Action), Sword): ( + files: [ + "voxygen.audio.sfx.abilities.swing_sword", + ], + threshold: 0.7, + ), + Attack(ChargedMelee(Action), Sword): ( + files: [ + "voxygen.audio.sfx.abilities.swing_sword", + ], + threshold: 0.7, + ), + Attack(DashMelee(Action), Sword): ( + files: [ + "voxygen.audio.sfx.abilities.sword_dash", + ], + threshold: 0.8, + ), + Attack(SpinMelee(Action), Sword): ( + files: [ + "voxygen.audio.sfx.abilities.swing_sword", + ], + threshold: 0.7, + ), Attack(ComboMelee(Action, 1), Sword): ( files: [ "voxygen.audio.sfx.abilities.swing_sword", @@ -324,18 +372,6 @@ ], threshold: 0.7, ), - Attack(DashMelee(Action), Sword): ( - files: [ - "voxygen.audio.sfx.abilities.sword_dash", - ], - threshold: 0.8, - ), - Attack(SpinMelee(Action), Sword): ( - files: [ - "voxygen.audio.sfx.abilities.swing_sword", - ], - threshold: 0.7, - ), Inventory(CollectedTool(Sword)): ( files: [ "voxygen.audio.sfx.inventory.pickup_sword", diff --git a/common/src/comp/ability.rs b/common/src/comp/ability.rs index fe51ea06fc..17ec38a8d0 100644 --- a/common/src/comp/ability.rs +++ b/common/src/comp/ability.rs @@ -399,6 +399,11 @@ pub enum CharacterAbilityType { DashMelee(StageSection), BasicBlock, ComboMelee(StageSection, u32), + ComboMelee2(StageSection), + FinisherMelee(StageSection), + DiveMelee(StageSection), + RiposteMelee(StageSection), + RapidMelee(StageSection), LeapMelee(StageSection), SpinMelee(StageSection), Music(StageSection), @@ -420,6 +425,13 @@ impl From<&CharacterState> for CharacterAbilityType { CharacterState::BasicBlock(_) => Self::BasicBlock, CharacterState::LeapMelee(data) => Self::LeapMelee(data.stage_section), CharacterState::ComboMelee(data) => Self::ComboMelee(data.stage_section, data.stage), + CharacterState::ComboMelee2(data) => { + data.stage_section.map_or(Self::Other, Self::ComboMelee2) + }, + CharacterState::FinisherMelee(data) => Self::FinisherMelee(data.stage_section), + CharacterState::DiveMelee(data) => Self::DiveMelee(data.stage_section), + CharacterState::RiposteMelee(data) => Self::RiposteMelee(data.stage_section), + CharacterState::RapidMelee(data) => Self::RapidMelee(data.stage_section), CharacterState::SpinMelee(data) => Self::SpinMelee(data.stage_section), CharacterState::ChargedMelee(data) => Self::ChargedMelee(data.stage_section), CharacterState::ChargedRanged(_) => Self::ChargedRanged, @@ -446,12 +458,7 @@ impl From<&CharacterState> for CharacterAbilityType { | CharacterState::UseItem(_) | CharacterState::SpriteInteract(_) | CharacterState::Skate(_) - | CharacterState::Wallrun(_) - | CharacterState::ComboMelee2(_) - | CharacterState::FinisherMelee(_) - | CharacterState::DiveMelee(_) - | CharacterState::RiposteMelee(_) - | CharacterState::RapidMelee(_) => Self::Other, + | CharacterState::Wallrun(_) => Self::Other, } } }