mirror of
https://github.com/rehlds/rehlds.git
synced 2024-12-27 23:25:45 +03:00
Fixed volume checking in emit sound (#341)
Co-authored-by: Dmitry Novikov <s1lentsk@yandex.ru> Co-authored-by: Sergey Shorokhov <wopox1337@ya.ru>
This commit is contained in:
parent
3a9bfb9ca1
commit
0fed5b8038
@ -312,7 +312,11 @@ void EXT_FUNC PF_ambientsound_I(edict_t *entity, float *pos, const char *samp, f
|
||||
|
||||
void EXT_FUNC PF_sound_I(edict_t *entity, int channel, const char *sample, float volume, float attenuation, int fFlags, int pitch)
|
||||
{
|
||||
#ifdef REHLDS_FIXES
|
||||
if (volume < 0.0f || volume > 1.0f)
|
||||
#else
|
||||
if (volume < 0.0 || volume > 255.0)
|
||||
#endif
|
||||
Sys_Error("%s: volume = %i", __func__, volume);
|
||||
if (attenuation < 0.0 || attenuation > 4.0)
|
||||
Sys_Error("%s: attenuation = %f", __func__, attenuation);
|
||||
|
Loading…
Reference in New Issue
Block a user