parent
9f4c6c61d9
commit
fba71ed24d
@ -677,11 +677,7 @@ bool InternalPrecacheScriptSound(const char *soundname)
|
|||||||
for (int wave = 0; wave < waveCount; wave++)
|
for (int wave = 0; wave < waveCount; wave++)
|
||||||
{
|
{
|
||||||
const char* waveName = soundemitterbase->GetWaveName(internal->GetSoundNames()[wave].symbol);
|
const char* waveName = soundemitterbase->GetWaveName(internal->GetSoundNames()[wave].symbol);
|
||||||
// return true even if we precache no new wavs
|
engsound->PrecacheSound(waveName);
|
||||||
if (!engsound->IsSoundPrecached(waveName))
|
|
||||||
{
|
|
||||||
engsound->PrecacheSound(waveName);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -1590,10 +1586,7 @@ static cell_t smn_GetGameSoundParams(IPluginContext *pContext, const cell_t *par
|
|||||||
pContext->StringToLocal(params[6], params[7], soundParams.soundname);
|
pContext->StringToLocal(params[6], params[7], soundParams.soundname);
|
||||||
|
|
||||||
// Precache the sound we're returning
|
// Precache the sound we're returning
|
||||||
if (!engsound->IsSoundPrecached(soundParams.soundname))
|
InternalPrecacheScriptSound(soundname);
|
||||||
{
|
|
||||||
InternalPrecacheScriptSound(soundname);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -322,7 +322,9 @@ native bool PrecacheSound(const char[] sound, bool preload=false);
|
|||||||
*
|
*
|
||||||
* @param sound Name of the sound to check.
|
* @param sound Name of the sound to check.
|
||||||
* @return True if precached, false otherwise.
|
* @return True if precached, false otherwise.
|
||||||
|
* @deprecated Doesn't work correctly, always returns true.
|
||||||
*/
|
*/
|
||||||
|
#pragma deprecated Doesn't work correctly, always returns true.
|
||||||
native bool IsSoundPrecached(const char[] sound);
|
native bool IsSoundPrecached(const char[] sound);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user