From 748f3ca37deb646667b732c92954bf7ef92e45b9 Mon Sep 17 00:00:00 2001 From: icculus Date: Sun, 29 Jun 2008 04:04:33 +0000 Subject: Don't show VoIP meter in all the common scenarios. git-svn-id: svn://svn.icculus.org/quake3/trunk@1399 edf5b092-35ff-0310-97b2-ce42778d08ea --- 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 f3e6faf..dd9b5c1 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) -- cgit v1.2.3