mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 09:53:53 +00:00
Move "land" check earlier
This commit is contained in:
parent
2b45fd84ea
commit
ae0a6a22b3
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue