SoundDef: add 'pitch' support to Sound_PlayAt(), the pointsound builtin does

support pitch on FTEQW but it's not advertised in the extensions .qc
This commit is contained in:
Marco Cawthorne 2022-03-02 09:14:02 -08:00
parent c8ea9f3e3f
commit ee2d3f6b3f
Signed by: eukara
GPG key ID: C196CD8BA993248A

View file

@ -511,6 +511,7 @@ Sound_Play(entity target, int chan, string shader)
}
}
void(vector origin, string sample, float volume, float attenuation, float pitch) pointsound_proper = #483;
void
Sound_PlayAt(vector pos, string shader)
{
@ -562,7 +563,7 @@ Sound_PlayAt(vector pos, string shader)
#endif
/* really? this doesn't do any more? */
pointsound(pos, argv(r), g_sounds[sample].volume, Sound_GetAttenuation(sample));
pointsound_proper(pos, argv(r), g_sounds[sample].volume, Sound_GetAttenuation(sample), pitch);
}
#ifdef CLIENT