mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 20:51:31 +00:00
Merge pull request #921 from BjossiAlfreds/ogg
Fixed ignoretrack0 and ogg menu option bugs
This commit is contained in:
commit
caab3864c6
2 changed files with 6 additions and 19 deletions
|
@ -2113,23 +2113,6 @@ static void
|
|||
OGGShuffleFunc(void *unused)
|
||||
{
|
||||
Cvar_SetValue("ogg_shuffle", s_options_oggshuffle_box.curvalue);
|
||||
|
||||
cvar_t *ogg_enable= Cvar_Get("ogg_enable", "1", CVAR_ARCHIVE);
|
||||
int track = (int)strtol(cl.configstrings[CS_CDTRACK], (char **)NULL, 10);
|
||||
|
||||
if (s_options_oggshuffle_box.curvalue)
|
||||
{
|
||||
Cvar_Set("ogg_shuffle", "1");
|
||||
}
|
||||
else
|
||||
{
|
||||
Cvar_Set("ogg_shuffle", "0");
|
||||
}
|
||||
|
||||
if (ogg_enable->value)
|
||||
{
|
||||
OGG_PlayTrack(track);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2143,8 +2126,11 @@ EnableOGGMusic(void *unused)
|
|||
OGG_InitTrackList();
|
||||
OGG_Stop();
|
||||
|
||||
int track = (int)strtol(cl.configstrings[CS_CDTRACK], (char **)NULL, 10);
|
||||
OGG_PlayTrack(track);
|
||||
if (cls.state == ca_active)
|
||||
{
|
||||
int track = (int)strtol(cl.configstrings[CS_CDTRACK], (char **)NULL, 10);
|
||||
OGG_PlayTrack(track);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -349,6 +349,7 @@ OGG_PlayTrack(int trackNo)
|
|||
if(ogg_ignoretrack0->value == 0)
|
||||
{
|
||||
OGG_Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
// Special case: If ogg_ignoretrack0 is 0 we stopped the music (see above)
|
||||
|
|
Loading…
Reference in a new issue