1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-20 12:53:52 +00:00

Move "land" check earlier

This commit is contained in:
Capostrophic 2018-08-22 14:43:12 +03:00 committed by Capostrophic
parent 2b45fd84ea
commit ae0a6a22b3

View file

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