From: terencehill Date: Sat, 5 May 2012 23:39:58 +0000 (+0200) Subject: If music_playlist_randomX is set randomize the starting track too X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fheads%2Fterencehill%2Frandomize_first_song;p=xonotic%2Fdarkplaces.git If music_playlist_randomX is set randomize the starting track too Signed-off-by: terencehill --- diff --git a/cd_shared.c b/cd_shared.c index 43b4a7f4..0ae5cd59 100644 --- a/cd_shared.c +++ b/cd_shared.c @@ -638,14 +638,12 @@ void CDAudio_StartPlaylist(qboolean resume) } if (count > 0) { - // position < 0 means never resume track - if (position < 0) - position = 0; // advance to next track in playlist if the last one ended - if (!resume) + if (!resume || position < 0) // position < 0 means never resume track { position = 0; - current++; + if (!resume) + current++; if (randomplay) current = (int)lhrandom(0, count); }