diff --git a/doc/040_cvarlist.md b/doc/040_cvarlist.md index 1549826a..4c9b3706 100644 --- a/doc/040_cvarlist.md +++ b/doc/040_cvarlist.md @@ -348,10 +348,7 @@ it's `+set busywait 0` (setting the `busywait` cvar) and `-portable` - `0`: Loop the current track (the default). - `1`: Play the current track once, then stop. - `2`: Play all available tracks in a linear sequence. - - `3`: Shuffle through the available tracks, never play the same track - twice in a row. - - `4`: Shuffle through the available tracks, may play the same track - multiple times in a row. + - `3`: Shuffle through the available tracks. * **s_doppler**: If set to `1` doppler effects are enabled. This is only supported by the OpenAL sound backend. diff --git a/src/client/menu/menu.c b/src/client/menu/menu.c index 63b3e3bd..18549fc2 100644 --- a/src/client/menu/menu.c +++ b/src/client/menu/menu.c @@ -2529,7 +2529,6 @@ Options_MenuInit(void) "play once", "sequential", "random", - "truly random", NULL }; diff --git a/src/client/sound/ogg.c b/src/client/sound/ogg.c index 7c7e7672..4e095c75 100644 --- a/src/client/sound/ogg.c +++ b/src/client/sound/ogg.c @@ -531,23 +531,10 @@ OGG_PlayTrack(const char *track, qboolean cdtrack, qboolean immediate) newtrack = (curtrack + 1) % (ogg_maxfileindex + 1) != 0 ? (curtrack + 1) : 2; } break; case 3: // random - case 4: // random with true randomness { - int retries = 100; - newtrack = 0; - - while (retries-- > 0 && newtrack < 2) - { - newtrack = randk() % (ogg_maxfileindex + 1); - - if (playback == 3) - { - if (newtrack == curtrack) - { - newtrack = 0; - } - } - } + newtrack = (randk() % (ogg_maxfileindex - 1) + 2); + newtrack = (newtrack == curtrack) ? newtrack + 1 : newtrack; + newtrack = (newtrack > ogg_maxfileindex) ? 2 : newtrack; } break; }