forked from teamnwah/openmw-tes3coop
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
|
||||
// sounds and remove those with matching cell.
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
#include "../mwmechanics/mechanicsmanager.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
#include "ptr.hpp"
|
||||
#include "environment.hpp"
|
||||
|
||||
|
@ -535,9 +537,9 @@ namespace MWWorld
|
|||
{
|
||||
mEnvironment.mMechanicsManager->dropActors (active->first);
|
||||
active->second->destroy();
|
||||
mEnvironment.mSoundManager->stopSound (active->first);
|
||||
delete active->second;
|
||||
mActiveCells.erase (active);
|
||||
// TODO remove sounds
|
||||
}
|
||||
|
||||
// register local scripts
|
||||
|
|
Loading…
Reference in a new issue