mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-19 20:53:52 +00:00
Merge branch 'titlefix' into 'master'
Repeat title music only in main menu See merge request OpenMW/openmw!3436
This commit is contained in:
commit
38d0ece366
1 changed files with 6 additions and 2 deletions
|
@ -16,6 +16,7 @@
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/mechanicsmanager.hpp"
|
#include "../mwbase/mechanicsmanager.hpp"
|
||||||
#include "../mwbase/statemanager.hpp"
|
#include "../mwbase/statemanager.hpp"
|
||||||
|
#include "../mwbase/windowmanager.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
|
|
||||||
#include "../mwworld/cellstore.hpp"
|
#include "../mwworld/cellstore.hpp"
|
||||||
|
@ -1135,7 +1136,10 @@ namespace MWSound
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MWBase::StateManager::State state = MWBase::Environment::get().getStateManager()->getState();
|
MWBase::StateManager::State state = MWBase::Environment::get().getStateManager()->getState();
|
||||||
if (state == MWBase::StateManager::State_NoGame && !isMusicPlaying())
|
bool isMainMenu = MWBase::Environment::get().getWindowManager()->containsMode(MWGui::GM_MainMenu)
|
||||||
|
&& state == MWBase::StateManager::State_NoGame;
|
||||||
|
|
||||||
|
if (isMainMenu && !isMusicPlaying())
|
||||||
{
|
{
|
||||||
std::string titlefile = "music/special/morrowind title.mp3";
|
std::string titlefile = "music/special/morrowind title.mp3";
|
||||||
if (mVFS->exists(titlefile))
|
if (mVFS->exists(titlefile))
|
||||||
|
@ -1143,7 +1147,7 @@ namespace MWSound
|
||||||
}
|
}
|
||||||
|
|
||||||
updateSounds(duration);
|
updateSounds(duration);
|
||||||
if (MWBase::Environment::get().getStateManager()->getState() != MWBase::StateManager::State_NoGame)
|
if (state != MWBase::StateManager::State_NoGame)
|
||||||
{
|
{
|
||||||
updateRegionSound(duration);
|
updateRegionSound(duration);
|
||||||
updateWaterSound();
|
updateWaterSound();
|
||||||
|
|
Loading…
Reference in a new issue