From 21d1cd380b94857b50cb2dc24862099ff334afe8 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 29 Jun 2008 04:04:33 +0000 Subject: [PATCH] Don't show VoIP meter in all the common scenarios. --- code/client/cl_scrn.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/code/client/cl_scrn.c b/code/client/cl_scrn.c index f3e6faf4..dd9b5c16 100644 --- a/code/client/cl_scrn.c +++ b/code/client/cl_scrn.c @@ -354,10 +354,19 @@ void SCR_DrawVoipMeter( void ) { int limit, i; if (!cl_voipShowMeter->integer) - return; - - if (!cl_voipSend->integer) - return; + return; // player doesn't want to show meter at all. + else if (!cl_voipSend->integer) + return; // not recording at the moment. + else if (cls.state != CA_ACTIVE) + return; // not connected to a server. + else if (!cl_connectedToVoipServer) + return; // server doesn't support VoIP. + else if ( Cvar_VariableValue( "g_gametype" ) == GT_SINGLE_PLAYER || Cvar_VariableValue("ui_singlePlayerActive")) + return; // single player game. + else if (clc.demoplaying) + return ; // playing back a demo. + else if (!voip->integer) + return; // client has VoIP support disabled. limit = (int) (clc.voipPower * 10.0f); if (limit > 10)