1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-30 12:32:36 +00:00

Removed unnecessary calls to stopSound3D

playSound3D (the one taking a ptr) already stops the sound if it's playing.
This commit is contained in:
jeremy 2019-07-04 22:54:39 +02:00
parent c8c06ceee9
commit 962462c1c5

View File

@ -983,7 +983,6 @@ void CharacterController::handleTextKey(const std::string &groupname, const std:
if(evt.compare(0, 7, "sound: ") == 0) if(evt.compare(0, 7, "sound: ") == 0)
{ {
MWBase::SoundManager *sndMgr = MWBase::Environment::get().getSoundManager(); MWBase::SoundManager *sndMgr = MWBase::Environment::get().getSoundManager();
sndMgr->stopSound3D(mPtr, evt.substr(7));
sndMgr->playSound3D(mPtr, evt.substr(7), 1.0f, 1.0f); sndMgr->playSound3D(mPtr, evt.substr(7), 1.0f, 1.0f);
return; return;
} }
@ -1024,7 +1023,6 @@ void CharacterController::handleTextKey(const std::string &groupname, const std:
} }
else else
{ {
sndMgr->stopSound3D(mPtr, sound);
sndMgr->playSound3D(mPtr, sound, volume, pitch); sndMgr->playSound3D(mPtr, sound, volume, pitch);
} }
} }