From ae0a6a22b3a0cdcfda40dec66e1963e90fdb1930 Mon Sep 17 00:00:00 2001 From: Capostrophic <21265616+Capostrophic@users.noreply.github.com> Date: Wed, 22 Aug 2018 14:43:12 +0300 Subject: [PATCH] Move "land" check earlier --- apps/openmw/mwmechanics/character.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index be9daee887..686d0924ad 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -913,7 +913,8 @@ void CharacterController::handleTextKey(const std::string &groupname, const std: sndMgr->playSound3D(mPtr, evt.substr(7), 1.0f, 1.0f); return; } - if(evt.compare(0, 10, "soundgen: ") == 0) + if(evt.compare(0, 10, "soundgen: ") == 0 + && evt.compare(10, evt.size()-10, "land") != 0) // Morrowind ignores land soundgen for some reason { std::string soundgen = evt.substr(10); @@ -939,7 +940,7 @@ void CharacterController::handleTextKey(const std::string &groupname, const std: } std::string sound = mPtr.getClass().getSoundIdFromSndGen(mPtr, soundgen); - if(!sound.empty() && evt.compare(10, evt.size()-10, "land") != 0) // Don't play landing sounds here + if(!sound.empty()) { MWBase::SoundManager *sndMgr = MWBase::Environment::get().getSoundManager(); if(evt.compare(10, evt.size()-10, "left") == 0 || evt.compare(10, evt.size()-10, "right") == 0)