diff --git a/apps/openmw/mwworld/actionequip.cpp b/apps/openmw/mwworld/actionequip.cpp index 50da1e5e5..165a8e192 100644 --- a/apps/openmw/mwworld/actionequip.cpp +++ b/apps/openmw/mwworld/actionequip.cpp @@ -3,6 +3,7 @@ #include "../mwbase/environment.hpp" #include "../mwbase/world.hpp" #include "../mwbase/windowmanager.hpp" +#include "../mwbase/soundmanager.hpp" #include @@ -85,5 +86,18 @@ namespace MWWorld invStore.equip(*slot, it, actor); } } + + std::string sound; + + if (object.getTypeName() == typeid(ESM::Light).name()) + { + sound = object.get()->mBase->mSound; + } + if (!sound.empty()) + { + MWBase::Environment::get().getSoundManager()->playSound(sound, 1.0f, 1.0f, + MWBase::SoundManager::Play_TypeSfx, + MWBase::SoundManager::Play_Loop); + } } }