mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-31 21:45:33 +00:00
Fix for the --nosound crash
This commit is contained in:
parent
af39275a63
commit
f567950e25
2 changed files with 8 additions and 2 deletions
|
@ -67,6 +67,7 @@ namespace MWSound
|
|||
, updater(mgr)
|
||||
, cameraTracker(mgr)
|
||||
, mCurrentPlaylist(NULL)
|
||||
, mUsingSound(useSound)
|
||||
{
|
||||
if(useSound)
|
||||
{
|
||||
|
@ -105,8 +106,11 @@ namespace MWSound
|
|||
|
||||
SoundManager::~SoundManager()
|
||||
{
|
||||
Ogre::Root::getSingleton().removeFrameListener(&updater);
|
||||
cameraTracker.unfollowCamera();
|
||||
if(mUsingSound)
|
||||
{
|
||||
Ogre::Root::getSingleton().removeFrameListener(&updater);
|
||||
cameraTracker.unfollowCamera();
|
||||
}
|
||||
}
|
||||
|
||||
// Convert a soundId to file name, and modify the volume
|
||||
|
|
|
@ -82,6 +82,8 @@ namespace MWSound
|
|||
|
||||
IDMap mLoopedSounds;
|
||||
|
||||
bool mUsingSound;
|
||||
|
||||
std::string lookup(const std::string &soundId,
|
||||
float &volume, float &min, float &max);
|
||||
void add(const std::string &file,
|
||||
|
|
Loading…
Reference in a new issue