- preserve the factor set by I_SetMusicVolume when starting new music.

This commit is contained in:
Christoph Oelckers 2016-12-27 15:44:06 +01:00
parent 4bf19fb665
commit e956d19769
1 changed files with 6 additions and 1 deletions

View File

@ -227,7 +227,12 @@ void MusInfo::Start(bool loop, float rel_vol, int subsong)
{ {
if (nomusic) return; if (nomusic) return;
if (rel_vol > 0.f) saved_relative_volume = relative_volume = rel_vol; if (rel_vol > 0.f)
{
float factor = relative_volume / saved_relative_volume;
saved_relative_volume = rel_vol;
relative_volume = saved_relative_volume * factor;
}
Stop (); Stop ();
Play (loop, subsong); Play (loop, subsong);
m_NotStartedYet = false; m_NotStartedYet = false;