forked from teamnwah/openmw-tes3coop
Stop title music when the game starts (Fixes #2468)
This commit is contained in:
parent
833ad5a2b4
commit
b01abe4d19
2 changed files with 5 additions and 8 deletions
|
@ -646,9 +646,6 @@ void OMW::Engine::go()
|
|||
|
||||
prepareEngine (settings);
|
||||
|
||||
// Play some good 'ol tunes
|
||||
MWBase::Environment::get().getSoundManager()->playPlaylist(std::string("Explore"));
|
||||
|
||||
if (!mSaveGameFile.empty())
|
||||
{
|
||||
MWBase::Environment::get().getStateManager()->loadGame(mSaveGameFile);
|
||||
|
|
|
@ -1200,18 +1200,18 @@ namespace MWMechanics
|
|||
killDeadActors();
|
||||
|
||||
// check if we still have any player enemies to switch music
|
||||
static bool isBattleMusic = false;
|
||||
static int currentMusic = 0;
|
||||
|
||||
if (isBattleMusic && hostilesCount == 0 && !(player.getClass().getCreatureStats(player).isDead() &&
|
||||
if (currentMusic != 1 && hostilesCount == 0 && !(player.getClass().getCreatureStats(player).isDead() &&
|
||||
MWBase::Environment::get().getSoundManager()->isMusicPlaying()))
|
||||
{
|
||||
MWBase::Environment::get().getSoundManager()->playPlaylist(std::string("Explore"));
|
||||
isBattleMusic = false;
|
||||
currentMusic = 1;
|
||||
}
|
||||
else if (!isBattleMusic && hostilesCount > 0)
|
||||
else if (currentMusic != 2 && hostilesCount > 0)
|
||||
{
|
||||
MWBase::Environment::get().getSoundManager()->playPlaylist(std::string("Battle"));
|
||||
isBattleMusic = true;
|
||||
currentMusic = 2;
|
||||
}
|
||||
|
||||
static float sneakTimer = 0.f; // times update of sneak icon
|
||||
|
|
Loading…
Reference in a new issue