r1692 - in trunk/data: . qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Jun 29 08:47:30 EDT 2006


Author: div0
Date: 2006-06-29 08:47:30 -0400 (Thu, 29 Jun 2006)
New Revision: 1692

Modified:
   trunk/data/default.cfg
   trunk/data/qcsrc/server/clientcommands.qc
   trunk/data/qcsrc/server/g_world.qc
Log:
added command "gotomap" which does the same as chmap, but forces the
intermission in between

voting for chmap will be remapped to gotomap


Modified: trunk/data/default.cfg
===================================================================
--- trunk/data/default.cfg	2006-06-29 10:25:06 UTC (rev 1691)
+++ trunk/data/default.cfg	2006-06-29 12:47:30 UTC (rev 1692)
@@ -34,6 +34,7 @@
 alias bsp "ls maps/*.bsp"
 alias mapcfg "ls maps/*.mapcfg"
 alias chmap "exec $exit_cfg ; exec game_reset.cfg; exec maps/$1.mapcfg"
+alias gotomap "nextmap $1; timelimit -1"
 alias reset "exec game_reset.cfg"
 
 alias dem "ls demos/*.dem"
@@ -628,7 +629,7 @@
 bind F4 ready
 
 // these commands can be voted
-set sv_vote_commands "restart timelimit fraglimit chmap g_grappling_hook sv_defaultplayer_fbskin_green sv_defaultplayer_fbskin_red sv_defaultplayer_fbskin_orange sv_defaultplayer_fbskin_off"
+set sv_vote_commands "restart timelimit fraglimit chmap gotomap g_grappling_hook sv_defaultplayer_fbskin_green sv_defaultplayer_fbskin_red sv_defaultplayer_fbskin_orange sv_defaultplayer_fbskin_off"
 // users can call a vote for the above commands
 set sv_vote_call 1
 // users can call a vote to become master

Modified: trunk/data/qcsrc/server/clientcommands.qc
===================================================================
--- trunk/data/qcsrc/server/clientcommands.qc	2006-06-29 10:25:06 UTC (rev 1691)
+++ trunk/data/qcsrc/server/clientcommands.qc	2006-06-29 12:47:30 UTC (rev 1692)
@@ -92,6 +92,10 @@
 							return;
 						votecalled = TRUE;
 						votecalledmaster = FALSE;
+						// remap chmap to gomap (forces intermission)
+						if(strlen(vote) >= 6)
+							if(substring(vote, 0, 6) == "chmap ")
+								vote = strcat("gotomap ", substring(vote, 6, strlen(vote) - 6));
 						votecalledvote = strzone(vote);
 						votecaller = self; // remember who called the vote
 						votefinished = time + cvar("sv_vote_timeout");
@@ -271,6 +275,8 @@
 		ext = ".bsp";
 	else if(argv(0) == "chmap")
 		ext = ".mapcfg";
+	else if(argv(0) == "gotomap")
+		ext = ".mapcfg";
 	else
 		return TRUE;
 

Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc	2006-06-29 10:25:06 UTC (rev 1691)
+++ trunk/data/qcsrc/server/g_world.qc	2006-06-29 12:47:30 UTC (rev 1692)
@@ -1143,7 +1143,7 @@
 		bcenterprint("^3Now playing ^1OVERTIME^3!\n\n^3Keep fragging until we have a ^1winner^3!");
 	}
 
-	if (!checkrules_oneminutewarning && timelimit && time > timelimit - 60)
+	if (!checkrules_oneminutewarning && timelimit > 0 && time > timelimit - 60)
 	{
 		checkrules_oneminutewarning = TRUE;
 		sound(world, CHAN_AUTO, "announcer/robotic/1minuteremains.ogg", 1, ATTN_NONE);




More information about the nexuiz-commits mailing list