Fix GetGameSoundParams in CSGO (#1631)
* Fix GetGameSoundParams CSGO * Added preprocessor comments * Revert InternalPrecacheScriptSound
This commit is contained in:
parent
88a0a458a6
commit
370fa8209b
@ -648,13 +648,20 @@ bool GetSoundParams(CSoundParameters *soundParams, const char *soundname, cell_t
|
|||||||
if ( !soundname[0] )
|
if ( !soundname[0] )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE
|
||||||
|
HSOUNDSCRIPTHASH index = soundemitterbase->HashSoundName(soundname);
|
||||||
|
|
||||||
|
if(!soundemitterbase->IsValidHash(index))
|
||||||
|
return false;
|
||||||
|
#else
|
||||||
#if SOURCE_ENGINE >= SE_PORTAL2
|
#if SOURCE_ENGINE >= SE_PORTAL2
|
||||||
HSOUNDSCRIPTHASH index = (HSOUNDSCRIPTHASH)soundemitterbase->GetSoundIndex(soundname);
|
HSOUNDSCRIPTHASH index = (HSOUNDSCRIPTHASH)soundemitterbase->GetSoundIndex(soundname);
|
||||||
#else
|
#else
|
||||||
HSOUNDSCRIPTHANDLE index = (HSOUNDSCRIPTHANDLE)soundemitterbase->GetSoundIndex(soundname);
|
HSOUNDSCRIPTHANDLE index = (HSOUNDSCRIPTHANDLE)soundemitterbase->GetSoundIndex(soundname);
|
||||||
#endif
|
#endif // SOURCE_ENGINE >= SE_PORTAL2
|
||||||
if (!soundemitterbase->IsValidIndex(index))
|
if (!soundemitterbase->IsValidIndex(index))
|
||||||
return false;
|
return false;
|
||||||
|
#endif // SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE
|
||||||
|
|
||||||
gender_t gender = GENDER_NONE;
|
gender_t gender = GENDER_NONE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user