Use precache_generic() for sounds that are played client-side (#934)
This commit is contained in:
parent
3289b3c63c
commit
01e60834fa
|
@ -173,15 +173,7 @@ public plugin_precache( )
|
||||||
}
|
}
|
||||||
if ( file_exists( szSound ) )
|
if ( file_exists( szSound ) )
|
||||||
{
|
{
|
||||||
if ( sndExt[1] == 'm')
|
precache_generic( szSound );
|
||||||
{
|
|
||||||
precache_generic( szSound ); // mp3
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
replace( szSound, charsmax(szSound), "sound/", "" ); // wav, strip the leading sound/ we added for our file_exists check
|
|
||||||
precache_sound( szSound );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
line++;
|
line++;
|
||||||
|
|
|
@ -377,7 +377,7 @@ precache_sound_custom( const sound[] )
|
||||||
formatex(fullpathsound, charsmax(fullpathsound), "sound/%s.wav", sound)
|
formatex(fullpathsound, charsmax(fullpathsound), "sound/%s.wav", sound)
|
||||||
if( file_exists(fullpathsound) )
|
if( file_exists(fullpathsound) )
|
||||||
{
|
{
|
||||||
precache_sound(fullpathsound[6])
|
precache_generic(fullpathsound)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,21 +14,21 @@
|
||||||
#include <amxmodx>
|
#include <amxmodx>
|
||||||
|
|
||||||
public plugin_precache(){
|
public plugin_precache(){
|
||||||
precache_sound( "misc/impressive.wav")
|
precache_generic( "sound/misc/impressive.wav")
|
||||||
precache_sound( "misc/headshot.wav")
|
precache_generic( "sound/misc/headshot.wav")
|
||||||
precache_sound( "misc/multikill.wav")
|
precache_generic( "sound/misc/multikill.wav")
|
||||||
precache_sound( "misc/doublekill.wav")
|
precache_generic( "sound/misc/doublekill.wav")
|
||||||
precache_sound( "misc/godlike.wav")
|
precache_generic( "sound/misc/godlike.wav")
|
||||||
precache_sound( "misc/ultrakill.wav")
|
precache_generic( "sound/misc/ultrakill.wav")
|
||||||
precache_sound( "misc/killingspree.wav")
|
precache_generic( "sound/misc/killingspree.wav")
|
||||||
precache_sound( "misc/rampage.wav")
|
precache_generic( "sound/misc/rampage.wav")
|
||||||
precache_sound( "misc/unstoppable.wav")
|
precache_generic( "sound/misc/unstoppable.wav")
|
||||||
precache_sound( "misc/monsterkill.wav")
|
precache_generic( "sound/misc/monsterkill.wav")
|
||||||
precache_sound( "misc/humiliation.wav")
|
precache_generic( "sound/misc/humiliation.wav")
|
||||||
|
|
||||||
precache_sound( "misc/takenlead.wav" )
|
precache_generic( "sound/misc/takenlead.wav" )
|
||||||
precache_sound( "misc/tiedlead.wav" )
|
precache_generic( "sound/misc/tiedlead.wav" )
|
||||||
precache_sound( "misc/lostlead.wav" )
|
precache_generic( "sound/misc/lostlead.wav" )
|
||||||
|
|
||||||
return PLUGIN_CONTINUE
|
return PLUGIN_CONTINUE
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,21 +14,21 @@
|
||||||
#include <amxmodx>
|
#include <amxmodx>
|
||||||
|
|
||||||
public plugin_precache(){
|
public plugin_precache(){
|
||||||
precache_sound( "misc/impressive.wav")
|
precache_generic( "sound/misc/impressive.wav")
|
||||||
precache_sound( "misc/headshot.wav")
|
precache_generic( "sound/misc/headshot.wav")
|
||||||
precache_sound( "misc/multikill.wav")
|
precache_generic( "sound/misc/multikill.wav")
|
||||||
precache_sound( "misc/doublekill.wav")
|
precache_generic( "sound/misc/doublekill.wav")
|
||||||
precache_sound( "misc/godlike.wav")
|
precache_generic( "sound/misc/godlike.wav")
|
||||||
precache_sound( "misc/ultrakill.wav")
|
precache_generic( "sound/misc/ultrakill.wav")
|
||||||
precache_sound( "misc/killingspree.wav")
|
precache_generic( "sound/misc/killingspree.wav")
|
||||||
precache_sound( "misc/rampage.wav")
|
precache_generic( "sound/misc/rampage.wav")
|
||||||
precache_sound( "misc/unstoppable.wav")
|
precache_generic( "sound/misc/unstoppable.wav")
|
||||||
precache_sound( "misc/monsterkill.wav")
|
precache_generic( "sound/misc/monsterkill.wav")
|
||||||
precache_sound( "misc/humiliation.wav")
|
precache_generic( "sound/misc/humiliation.wav")
|
||||||
|
|
||||||
precache_sound( "misc/takenlead.wav" )
|
precache_generic( "sound/misc/takenlead.wav" )
|
||||||
precache_sound( "misc/tiedlead.wav" )
|
precache_generic( "sound/misc/tiedlead.wav" )
|
||||||
precache_sound( "misc/lostlead.wav" )
|
precache_generic( "sound/misc/lostlead.wav" )
|
||||||
|
|
||||||
return PLUGIN_CONTINUE
|
return PLUGIN_CONTINUE
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,8 +92,8 @@ new g_HeadShots[7][] = {
|
||||||
}
|
}
|
||||||
|
|
||||||
public plugin_precache(){
|
public plugin_precache(){
|
||||||
precache_sound( "misc/headshot.wav")
|
precache_generic( "sound/misc/headshot.wav")
|
||||||
precache_sound( "misc/doublekill.wav")
|
precache_generic( "sound/misc/doublekill.wav")
|
||||||
return PLUGIN_CONTINUE
|
return PLUGIN_CONTINUE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,21 +14,21 @@
|
||||||
#include <amxmodx>
|
#include <amxmodx>
|
||||||
|
|
||||||
public plugin_precache(){
|
public plugin_precache(){
|
||||||
precache_sound( "misc/impressive.wav")
|
precache_generic( "sound/misc/impressive.wav")
|
||||||
precache_sound( "misc/headshot.wav")
|
precache_generic( "sound/misc/headshot.wav")
|
||||||
precache_sound( "misc/multikill.wav")
|
precache_generic( "sound/misc/multikill.wav")
|
||||||
precache_sound( "misc/doublekill.wav")
|
precache_generic( "sound/misc/doublekill.wav")
|
||||||
precache_sound( "misc/godlike.wav")
|
precache_generic( "sound/misc/godlike.wav")
|
||||||
precache_sound( "misc/ultrakill.wav")
|
precache_generic( "sound/misc/ultrakill.wav")
|
||||||
precache_sound( "misc/killingspree.wav")
|
precache_generic( "sound/misc/killingspree.wav")
|
||||||
precache_sound( "misc/rampage.wav")
|
precache_generic( "sound/misc/rampage.wav")
|
||||||
precache_sound( "misc/unstoppable.wav")
|
precache_generic( "sound/misc/unstoppable.wav")
|
||||||
precache_sound( "misc/monsterkill.wav")
|
precache_generic( "sound/misc/monsterkill.wav")
|
||||||
precache_sound( "misc/humiliation.wav")
|
precache_generic( "sound/misc/humiliation.wav")
|
||||||
|
|
||||||
precache_sound( "misc/takenlead.wav" )
|
precache_generic( "sound/misc/takenlead.wav" )
|
||||||
precache_sound( "misc/tiedlead.wav" )
|
precache_generic( "sound/misc/tiedlead.wav" )
|
||||||
precache_sound( "misc/lostlead.wav" )
|
precache_generic( "sound/misc/lostlead.wav" )
|
||||||
|
|
||||||
return PLUGIN_CONTINUE
|
return PLUGIN_CONTINUE
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user