void G_Voice(Gentity *ent, Gentity *target, int mode, const char *id, qbool voiceonly) { int j; Gentity *other; if(g_gametype.integer < GT_TEAM && mode == SAY_TEAM) mode = SAY_ALL; if(target){ G_VoiceTo(ent, target, mode, id, voiceonly); return; } /* echo the text to the console */ if(g_dedicated.integer) G_Printf("voice: %s %s\n", ent->client->pers.netname, id); /* send it to all the apropriate clients */ for(j = 0; j < level.maxclients; j++){ other = &g_entities[j]; G_VoiceTo(ent, other, mode, id, voiceonly); } }
void G_Voice( gentity_t *ent, gentity_t *target, int mode, const char *id, qboolean voiceonly ) { int j; gentity_t *other; if ( g_gametype.integer < GT_TEAM && mode == SAY_TEAM ) { mode = SAY_ALL; } if ( target ) { G_VoiceTo( ent, target, mode, id, voiceonly ); return; } // echo the text to the console if ( g_dedicated.integer ) { G_Printf( "voice: %s %s\n", ent->client->pers.netname, id); } // send it to all the appropriate clients for (j = 0; j < level.maxclients; j++) { other = &g_entities[j]; G_VoiceTo( ent, other, mode, id, voiceonly ); } }