From 7ac9c9e759319b93bbe000fb70ca77caee2baad6 Mon Sep 17 00:00:00 2001 From: Rafael Barreto Date: Wed, 23 Jun 2010 22:55:05 +0000 Subject: [PATCH] mutevoicecomm git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5217 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clients2c.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/source/src/clients2c.cpp b/source/src/clients2c.cpp index a5773e87..1f34cfcd 100644 --- a/source/src/clients2c.cpp +++ b/source/src/clients2c.cpp @@ -280,6 +280,8 @@ void showhudextras(char hudextras, char value){ int lastspawn = 0; +VAR(mutevoicecomm, 0, 0, 2); + void parsemessages(int cn, playerent *d, ucharbuf &p) { static char text[MAXTRANS]; @@ -341,12 +343,18 @@ void parsemessages(int cn, playerent *d, ucharbuf &p) { playerent *d = getclient(getint(p)); if(d) d->lastvoicecom = lastmillis; - if(!d || !(d->muted || d->ignored)) audiomgr.playsound(getint(p), SP_HIGH); + if(!d || !(d->muted || d->ignored)) { + int t = getint(p); + if ( mutevoicecomm < 1 ) audiomgr.playsound(t, SP_HIGH); + } break; } case SV_VOICECOM: { - if(!d || !(d->muted || d->ignored)) audiomgr.playsound(getint(p), SP_HIGH); + if(!d || !(d->muted || d->ignored)) { + int t = getint(p); + if ( mutevoicecomm < 2 ) audiomgr.playsound(t, SP_HIGH); + } if(d) d->lastvoicecom = lastmillis; break; }