- Add stopmusic command
- Make cvar s_muted read-only
This commit is contained in:
parent
2a0812bc06
commit
be0a82d496
3 changed files with 21 additions and 6 deletions
|
@ -448,6 +448,20 @@ void S_Music_f( void ) {
|
|||
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
S_Music_f
|
||||
=================
|
||||
*/
|
||||
void S_StopMusic_f( void )
|
||||
{
|
||||
if(!si.StopBackgroundTrack)
|
||||
return;
|
||||
|
||||
si.StopBackgroundTrack();
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
/*
|
||||
|
@ -464,7 +478,7 @@ void S_Init( void )
|
|||
|
||||
s_volume = Cvar_Get( "s_volume", "0.8", CVAR_ARCHIVE );
|
||||
s_musicVolume = Cvar_Get( "s_musicvolume", "0.25", CVAR_ARCHIVE );
|
||||
s_muted = Cvar_Get("s_muted", "0", CVAR_TEMP);
|
||||
s_muted = Cvar_Get("s_muted", "0", CVAR_ROM);
|
||||
s_doppler = Cvar_Get( "s_doppler", "1", CVAR_ARCHIVE );
|
||||
s_backend = Cvar_Get( "s_backend", "", CVAR_ROM );
|
||||
s_muteWhenMinimized = Cvar_Get( "s_muteWhenMinimized", "0", CVAR_ARCHIVE );
|
||||
|
@ -479,6 +493,7 @@ void S_Init( void )
|
|||
|
||||
Cmd_AddCommand( "play", S_Play_f );
|
||||
Cmd_AddCommand( "music", S_Music_f );
|
||||
Cmd_AddCommand( "stopmusic", S_StopMusic_f );
|
||||
Cmd_AddCommand( "s_list", S_SoundList );
|
||||
Cmd_AddCommand( "s_stop", S_StopAllSounds );
|
||||
Cmd_AddCommand( "s_info", S_SoundInfo );
|
||||
|
@ -525,6 +540,7 @@ void S_Shutdown( void )
|
|||
|
||||
Cmd_RemoveCommand( "play" );
|
||||
Cmd_RemoveCommand( "music");
|
||||
Cmd_RemoveCommand( "stopmusic");
|
||||
Cmd_RemoveCommand( "s_list" );
|
||||
Cmd_RemoveCommand( "s_stop" );
|
||||
Cmd_RemoveCommand( "s_info" );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue