mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 09:39:41 +00:00
stop sounds on cell change
This commit is contained in:
parent
a6858b0cc4
commit
4649d7fa41
2 changed files with 4 additions and 2 deletions
|
@ -120,7 +120,7 @@ namespace MWSound
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void stopSound (MWWorld::Ptr::CellStore *cell)
|
void SoundManager::stopSound (MWWorld::Ptr::CellStore *cell)
|
||||||
{
|
{
|
||||||
// Note to Nico: You can get the cell of a Ptr via the getCell function. Just iterate over all
|
// Note to Nico: You can get the cell of a Ptr via the getCell function. Just iterate over all
|
||||||
// sounds and remove those with matching cell.
|
// sounds and remove those with matching cell.
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
|
|
||||||
#include "../mwmechanics/mechanicsmanager.hpp"
|
#include "../mwmechanics/mechanicsmanager.hpp"
|
||||||
|
|
||||||
|
#include "../mwsound/soundmanager.hpp"
|
||||||
|
|
||||||
#include "ptr.hpp"
|
#include "ptr.hpp"
|
||||||
#include "environment.hpp"
|
#include "environment.hpp"
|
||||||
|
|
||||||
|
@ -535,9 +537,9 @@ namespace MWWorld
|
||||||
{
|
{
|
||||||
mEnvironment.mMechanicsManager->dropActors (active->first);
|
mEnvironment.mMechanicsManager->dropActors (active->first);
|
||||||
active->second->destroy();
|
active->second->destroy();
|
||||||
|
mEnvironment.mSoundManager->stopSound (active->first);
|
||||||
delete active->second;
|
delete active->second;
|
||||||
mActiveCells.erase (active);
|
mActiveCells.erase (active);
|
||||||
// TODO remove sounds
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// register local scripts
|
// register local scripts
|
||||||
|
|
Loading…
Reference in a new issue