cleanup sound

This commit is contained in:
ac-stef
2017-05-22 11:29:41 +02:00
parent e126faef15
commit 788baf6299
2 changed files with 7 additions and 3 deletions
+2 -3
View File
@@ -427,12 +427,11 @@ void voicecom(char *sound, char *text)
static int last = 0;
if(!last || lastmillis-last > 2000)
{
extern int voicecomsounds;
defformatstring(soundpath)("voicecom/%s", sound);
int s = audiomgr.findsound(soundpath, 0, gamesounds);
if(s < 0 || s < S_AFFIRMATIVE || s >= S_NULL) return;
if(!valid_voicecom(s)) return;
if(voicecomsounds>0) audiomgr.playsound(s, SP_HIGH);
if(s >= S_NICESHOT) // public
if(valid_voicecom_public(s)) // public
{
addmsg(SV_VOICECOM, "ri", s);
toserver(text);