diff --git a/engine/client/cd_linux.c b/engine/client/cd_linux.c index 4474dfb0a..aaa1dc6b7 100644 --- a/engine/client/cd_linux.c +++ b/engine/client/cd_linux.c @@ -85,7 +85,7 @@ int CDAudio_GetAudioDiskInfo(void) } -void CDAudio_Play(int track, qboolean looping) +void CDAudio_Play(int track) { struct cdrom_tocentry entry; struct cdrom_ti ti; @@ -121,6 +121,8 @@ void CDAudio_Play(int track, qboolean looping) if ( ioctl(cdfile, CDROMRESUME) == -1 ) Con_DPrintf("ioctl cdromresume failed\n"); + playing = true; + if (!bgmvolume.value) CDAudio_Pause (); } @@ -185,9 +187,6 @@ qboolean CDAudio_Startup(void) if (cdfile != -1) return true; - if (!bgmvolume.value) - return false; - if ((i = COM_CheckParm("-cddev")) != 0 && i < com_argc - 1) { Q_strncpyz(cd_dev, com_argv[i + 1], sizeof(cd_dev)); diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index 5a73a4a72..0aad594e8 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -5700,8 +5700,11 @@ void CLQW_ParseServerMessage (void) break; case svc_cdtrack: - cl.cdtrack = MSG_ReadByte (); - Media_NumberedTrack ((qbyte)cl.cdtrack, (qbyte)cl.cdtrack); + { + unsigned int firsttrack; + firsttrack = MSG_ReadByte (); + Media_NumberedTrack (firsttrack, firsttrack); + } break; case svc_intermission: @@ -6350,10 +6353,13 @@ void CLNQ_ParseServerMessage (void) break; case svc_cdtrack: - cl.cdtrack = MSG_ReadByte (); - MSG_ReadByte (); - - Media_NumberedTrack ((qbyte)cl.cdtrack, (qbyte)cl.cdtrack); + { + unsigned int firsttrack; + unsigned int looptrack; + firsttrack = MSG_ReadByte (); + looptrack = MSG_ReadByte (); + Media_NumberedTrack (firsttrack, looptrack); + } break; case svc_setview: diff --git a/engine/client/clhl_game.c b/engine/client/clhl_game.c index b43e1db1a..55e177a2d 100644 --- a/engine/client/clhl_game.c +++ b/engine/client/clhl_game.c @@ -1458,9 +1458,13 @@ int CLHL_ParseGamePacket(void) cl.intermission = true; break; case svc_cdtrack: - cl.cdtrack = MSG_ReadByte(); - MSG_ReadByte(); - CDAudio_Play ((qbyte)cl.cdtrack, (qbyte)cl.cdtrack); + { + unsigned int firsttrack; + unsigned int looptrack; + firsttrack = MSG_ReadByte (); + looptrack = MSG_ReadByte (); + Media_NumberedTrack (firsttrack, looptrack); + } break; case 35: //svc_weaponanimation: diff --git a/engine/client/client.h b/engine/client/client.h index be5dda07a..7bfe1d41f 100644 --- a/engine/client/client.h +++ b/engine/client/client.h @@ -705,8 +705,6 @@ typedef struct int num_entities; // stored bottom up in cl_entities array int num_statics; // stored top down in cl_entitiers - int cdtrack; // cd audio - // all player information unsigned int allocated_client_slots; player_info_t players[MAX_CLIENTS];