From a7a48aaa910638ea98432638f5d00d302954e750 Mon Sep 17 00:00:00 2001 From: Kindi Date: Thu, 9 Nov 2023 00:27:07 +0800 Subject: [PATCH] make successful lockspell play unlock sound --- apps/openmw/mwmechanics/spelleffects.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/openmw/mwmechanics/spelleffects.cpp b/apps/openmw/mwmechanics/spelleffects.cpp index 2e28aaa1f3..db9ec3e588 100644 --- a/apps/openmw/mwmechanics/spelleffects.cpp +++ b/apps/openmw/mwmechanics/spelleffects.cpp @@ -932,6 +932,9 @@ namespace MWMechanics if (target.getCellRef().getLockLevel() < magnitude) // If the door is not already locked to a higher value, lock it to spell magnitude { + MWBase::Environment::get().getSoundManager()->playSound3D( + target, ESM::RefId::stringRefId("Open Lock"), 1.f, 1.f); + if (caster == getPlayer()) MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicLockSuccess}"); target.getCellRef().lock(magnitude);