Deprecate IsSoundPrecached (#1172)

Fix #1170
This commit is contained in:
naydef
2020-02-06 10:33:44 -08:00
committed by GitHub
parent 9f4c6c61d9
commit fba71ed24d
2 changed files with 4 additions and 9 deletions
+2 -9
View File
@@ -677,11 +677,7 @@ bool InternalPrecacheScriptSound(const char *soundname)
for (int wave = 0; wave < waveCount; wave++)
{
const char* waveName = soundemitterbase->GetWaveName(internal->GetSoundNames()[wave].symbol);
// return true even if we precache no new wavs
if (!engsound->IsSoundPrecached(waveName))
{
engsound->PrecacheSound(waveName);
}
engsound->PrecacheSound(waveName);
}
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);
// Precache the sound we're returning
if (!engsound->IsSoundPrecached(soundParams.soundname))
{
InternalPrecacheScriptSound(soundname);
}
InternalPrecacheScriptSound(soundname);
return true;
}