1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 21:40:03 +00:00

Merge branch 'makeunlocksoundwhenlocking' into 'master'

Play a sound when lock spell succeeds

See merge request OpenMW/openmw!3578
This commit is contained in:
Alexei Kotov 2023-11-09 20:00:55 +00:00
commit 49f13c53c0
2 changed files with 4 additions and 0 deletions

View File

@ -95,6 +95,7 @@
Bug #7647: NPC walk cycle bugs after greeting player
Bug #7654: Tooltips for enchantments with invalid effects cause crashes
Bug #7660: Some inconsistencies regarding Invisibility breaking
Bug #7675: Successful lock spell doesn't produce a sound
Feature #3537: Shader-based water ripples
Feature #5492: Let rain and snow collide with statics
Feature #6149: Dehardcode Lua API_REVISION

View File

@ -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);