Sound: add Sound_Stop() to make that task more slightly more accessible.
This commit is contained in:
parent
33e5038881
commit
29a997dbcf
2 changed files with 9 additions and 0 deletions
|
@ -109,4 +109,7 @@ int Sound_GetID(string sndDef);
|
||||||
void Sound_Speak(entity targetEntity, string sentencesEntry);
|
void Sound_Speak(entity targetEntity, string sentencesEntry);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/** Stops sounds on a given channel, on a target entity. */
|
||||||
|
void Sound_Stop(entity target, int chan);
|
||||||
|
|
||||||
void Sound_DebugList();
|
void Sound_DebugList();
|
|
@ -577,6 +577,12 @@ Sound_DistancePos(vector pos, string shader)
|
||||||
pointsound_proper(pos, argv(r), volume, ATTN_NONE, pitch);
|
pointsound_proper(pos, argv(r), volume, ATTN_NONE, pitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Sound_Stop(entity target, int chan)
|
||||||
|
{
|
||||||
|
sound(target, chan, "common/null.wav", 1.0f, ATTN_NORM, 100, SOUNDFLAG_FOLLOW, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Sound_Play(entity target, int chan, string shader)
|
Sound_Play(entity target, int chan, string shader)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue