r5767 - in trunk/data: . qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Feb 6 01:48:19 EST 2009


Author: div0
Date: 2009-02-06 01:48:16 -0500 (Fri, 06 Feb 2009)
New Revision: 5767

Modified:
   trunk/data/defaultNexuiz.cfg
   trunk/data/qcsrc/server/cl_player.qc
Log:
[ 2556013 ] g_chat_nospectators allowing specchat during warmup only


Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg	2009-02-06 06:43:47 UTC (rev 5766)
+++ trunk/data/defaultNexuiz.cfg	2009-02-06 06:48:16 UTC (rev 5767)
@@ -260,8 +260,8 @@
 set g_warmup_start_ammo_rockets 50
 set g_warmup_start_ammo_cells 50
 
-set g_chat_nospectators 0	"if set the chat sent by spectators or observers while being in match-stage can only seen by other specs/observers"
-set sv_vote_nospectators 0	"if set only players can call a vote during the match-stage (thus spectators and observers can't call a vote then)"
+set g_chat_nospectators 0	"if 0 spec/observer chat is always visible to the player, if 1 it is never visible to players, if 2 it is only visible to players during warmup stage"
+set sv_vote_nospectators 0	"if set only players can call a vote (thus spectators and observers can't call a vote)"
 
 alias g_tourney "g_tourney_$1"
 alias g_tourney_1 "g_warmup 1; g_chat_nospectators 1; sv_vote_nospectators 1"

Modified: trunk/data/qcsrc/server/cl_player.qc
===================================================================
--- trunk/data/qcsrc/server/cl_player.qc	2009-02-06 06:43:47 UTC (rev 5766)
+++ trunk/data/qcsrc/server/cl_player.qc	2009-02-06 06:48:16 UTC (rev 5767)
@@ -819,8 +819,10 @@
 	}
 	else
 	{
-		// TODO invent a cvar name for allowing global chat by spectators during warmup anyway
-		if(cvar("g_chat_nospectators") && source.classname != "player") {
+		if(
+			(cvar("g_chat_nospectators") == 1 && source.classname != "player")
+			|| (cvar("g_chat_nospectators") == 2 && source.classname != "player" && !inWarmupStage)
+		) {
 			FOR_EACH_REALCLIENT(head) if(head.classname != "player") {
 				sprint(head, msgstr);
 			}




More information about the nexuiz-commits mailing list