Skip to content

Commit

Permalink
Fix [music] ms_after= setting fade-out time of *previous* track
Browse files Browse the repository at this point in the history
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*.
  • Loading branch information
jyrkive committed Apr 18, 2019
1 parent 85c2928 commit ac6895f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sound.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit ac6895f

Please sign in to comment.