mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-28 23:09:46 +00:00
Reset music type to Normal when we are done to scripted music
This commit is contained in:
parent
e762ae9703
commit
402e725d87
1 changed files with 3 additions and 4 deletions
|
@ -16,7 +16,6 @@
|
||||||
#include <components/vfs/recursivedirectoryiterator.hpp>
|
#include <components/vfs/recursivedirectoryiterator.hpp>
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/mechanicsmanager.hpp"
|
|
||||||
#include "../mwbase/statemanager.hpp"
|
#include "../mwbase/statemanager.hpp"
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
|
@ -305,8 +304,6 @@ namespace MWSound
|
||||||
|
|
||||||
void SoundManager::streamMusic(VFS::Path::NormalizedView filename, MusicType type, float fade)
|
void SoundManager::streamMusic(VFS::Path::NormalizedView filename, MusicType type, float fade)
|
||||||
{
|
{
|
||||||
const auto mechanicsManager = MWBase::Environment::get().getMechanicsManager();
|
|
||||||
|
|
||||||
// Can not interrupt scripted music by built-in playlists
|
// Can not interrupt scripted music by built-in playlists
|
||||||
if (mMusicType == MusicType::MWScript && type != MusicType::MWScript)
|
if (mMusicType == MusicType::MWScript && type != MusicType::MWScript)
|
||||||
return;
|
return;
|
||||||
|
@ -1073,6 +1070,8 @@ namespace MWSound
|
||||||
streamMusicFull(mNextMusic);
|
streamMusicFull(mNextMusic);
|
||||||
mNextMusic = VFS::Path::Normalized();
|
mNextMusic = VFS::Path::Normalized();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
mMusicType = MusicType::Normal;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1257,7 +1256,7 @@ namespace MWSound
|
||||||
|
|
||||||
void SoundManager::clear()
|
void SoundManager::clear()
|
||||||
{
|
{
|
||||||
SoundManager::stopMusic();
|
stopMusic();
|
||||||
|
|
||||||
for (SoundMap::value_type& snd : mActiveSounds)
|
for (SoundMap::value_type& snd : mActiveSounds)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue