mutevoicecomm

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5217 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2010-06-23 22:55:05 +00:00
parent a547a37dda
commit 7ac9c9e759
+10 -2
View File
@@ -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;
}