Fix [music] ms_after= setting fade-out time of *previous* track

It's supposed to set the fade-out time of the track *itself*.

For this, play_music() needs to look at the track which is *being faded
out*, not the one that's *about to start playing*.
This commit is contained in:
Jyrki Vesterinen 2019-04-18 22:15:28 +03:00
parent 85c2928fde
commit ac6895feaa

View file

@ -585,7 +585,7 @@ void play_music()
music_start_time = 1; // immediate (same as effect as SDL_GetTicks())
want_new_music = true;
no_fading = false;
fadingout_time = current_track->ms_after();
fadingout_time = previous_track != nullptr ? previous_track->ms_after() : 0;
}
void play_track(unsigned int i)