Skip to content
Permalink
Browse files Browse the repository at this point in the history
Don't open .pk3 files as OpenAL drivers.
  • Loading branch information
SmileTheory committed Mar 14, 2017
1 parent 376267d commit f61fe5f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion code/client/snd_openal.c
Expand Up @@ -2512,11 +2512,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

1 comment on commit f61fe5f

@mickael9
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this redudant with the check in Sys_LoadDll (called from QAL_Init)?

Please sign in to comment.