Skip to content
Permalink
Browse files Browse the repository at this point in the history
All: Don't open .pk3 files as OpenAL drivers
  • Loading branch information
MAN-AT-ARMS committed Mar 14, 2017
1 parent b6ff2bc commit b248763
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion MP/code/client/snd_openal.c
Expand Up @@ -2618,11 +2618,17 @@ qboolean S_AL_Init( soundInterface_t *si )
s_alRolloff = Cvar_Get( "s_alRolloff", "2", CVAR_CHEAT);
s_alGraceDistance = Cvar_Get("s_alGraceDistance", "512", CVAR_CHEAT);

s_alDriver = Cvar_Get( "s_alDriver", ALDRIVER_DEFAULT, CVAR_ARCHIVE | CVAR_LATCH );
s_alDriver = Cvar_Get( "s_alDriver", ALDRIVER_DEFAULT, CVAR_ARCHIVE | CVAR_LATCH | CVAR_PROTECTED );

s_alInputDevice = Cvar_Get( "s_alInputDevice", "", CVAR_ARCHIVE | CVAR_LATCH );
s_alDevice = Cvar_Get("s_alDevice", "", CVAR_ARCHIVE | CVAR_LATCH);

if ( COM_CompareExtension( s_alDriver->string, ".pk3" ) )
{
Com_Printf( "Rejecting DLL named \"%s\"", s_alDriver->string );
return qfalse;
}

// Load QAL
if( !QAL_Init( s_alDriver->string ) )
{
Expand Down
8 changes: 7 additions & 1 deletion SP/code/client/snd_openal.c
Expand Up @@ -2675,11 +2675,17 @@ qboolean S_AL_Init( soundInterface_t *si )
s_alGraceDistance = Cvar_Get("s_alGraceDistance", "512", CVAR_ARCHIVE);
s_alTalkAnims = Cvar_Get("s_alTalkAnims", "160", CVAR_ARCHIVE);

s_alDriver = Cvar_Get( "s_alDriver", ALDRIVER_DEFAULT, CVAR_ARCHIVE | CVAR_LATCH );
s_alDriver = Cvar_Get( "s_alDriver", ALDRIVER_DEFAULT, CVAR_ARCHIVE | CVAR_LATCH | CVAR_PROTECTED );

s_alInputDevice = Cvar_Get( "s_alInputDevice", "", CVAR_ARCHIVE | CVAR_LATCH );
s_alDevice = Cvar_Get("s_alDevice", "", CVAR_ARCHIVE | CVAR_LATCH);

if ( COM_CompareExtension( s_alDriver->string, ".pk3" ) )
{
Com_Printf( "Rejecting DLL named \"%s\"", s_alDriver->string );
return qfalse;
}

// Load QAL
if( !QAL_Init( s_alDriver->string ) )
{
Expand Down

0 comments on commit b248763

Please sign in to comment.