r5895 - in trunk/data: . qcsrc/server

esteel at icculus.org esteel at icculus.org
Thu Feb 19 12:24:05 EST 2009


Author: esteel
Date: 2009-02-19 12:24:04 -0500 (Thu, 19 Feb 2009)
New Revision: 5895

Modified:
   trunk/data/defaultNexuiz.cfg
   trunk/data/qcsrc/server/clientcommands.qc
Log:
unready feature.. needs more testing though

Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg	2009-02-19 14:45:28 UTC (rev 5894)
+++ trunk/data/defaultNexuiz.cfg	2009-02-19 17:24:04 UTC (rev 5895)
@@ -54,6 +54,7 @@
 alias +hook +button6
 alias -hook -button6
 alias ready "cmd ready"
+alias unready "cmd unready"
 alias lockteams "sv_cmd lockteams"
 alias unlockteams "sv_cmd unlockteams"
 alias nospectators "sv_cmd nospectators"

Modified: trunk/data/qcsrc/server/clientcommands.qc
===================================================================
--- trunk/data/qcsrc/server/clientcommands.qc	2009-02-19 14:45:28 UTC (rev 5894)
+++ trunk/data/qcsrc/server/clientcommands.qc	2009-02-19 17:24:04 UTC (rev 5895)
@@ -224,25 +224,31 @@
 		} else {
 			sprint( self, strcat( "selectteam none/red/blue/yellow/pink/auto - \"", argv(1), "\" not recognised\n" ) );
 		}
-	} else if(argv(0) == "ready") {
+	} else if((argv(0) == "ready") || (argv(0) == "unready")) {
 		if not(self.flags & FL_CLIENT)
 			return;
+
 		if((inWarmupStage && 0 <= g_warmup_limit) // with unlimited warmup players have to be able to restart
 		   || cvar("sv_ready_restart"))
 		{
-			if(timeoutStatus) {
-				return sprint(self, "^1You cannot reset the game while a timeout is active!\n");
-			}
-
+			if(!readyrestart_happened || cvar("sv_ready_restart_repeatable"))
 			{
-				if(!readyrestart_happened || cvar("sv_ready_restart_repeatable"))
+				if (argv(0) == "ready")
 				{
 					self.ready = TRUE;
 					bprint(self.netname, "^2 is ready\n");
+				}
+				else
+				{
+					self.ready = FALSE;
+					bprint(self.netname, "^2 is ^1NOT^2 ready\n");
+				}
+
+				// cannot reset the game while a timeout is active!
+				if(!timeoutStatus) {
 					ReadyCount();
-				} else {
-					sprint(self, "^1game has already been restarted\n");
-				}
+			} else {
+				sprint(self, "^1Game has already been restarted\n");
 			}
 		}
 	} else if(argv(0) == "maplist") {




More information about the nexuiz-commits mailing list