projects
/
xonotic
/
darkplaces.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
61a89c2
)
If music_playlist_randomX is set randomize the starting track too
terencehill/randomize_first_song
author
terencehill <piuntn@gmail.com>
Sat, 5 May 2012 23:39:58 +0000
(
01:39
+0200)
committer
terencehill <piuntn@gmail.com>
Sat, 5 May 2012 23:43:29 +0000
(
01:43
+0200)
Signed-off-by: terencehill <piuntn@gmail.com>
cd_shared.c
patch
|
blob
|
history
diff --git
a/cd_shared.c
b/cd_shared.c
index 43b4a7f43338cadf08df419faf21c4da21ac66d2..0ae5cd59f6c3eafa02f0b781dc182bdf1a1e5146 100644
(file)
--- 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);
}