r1693 - in branches/nexuiz-2.0/data: . qcsrc/server

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


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

Modified:
   branches/nexuiz-2.0/data/default.cfg
   branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc
   branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
Log:
backport of "gotomap", also used as replacement for chmap in votes


Modified: branches/nexuiz-2.0/data/default.cfg
===================================================================
--- branches/nexuiz-2.0/data/default.cfg	2006-06-29 12:47:30 UTC (rev 1692)
+++ branches/nexuiz-2.0/data/default.cfg	2006-06-29 12:49:47 UTC (rev 1693)
@@ -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: branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc	2006-06-29 12:47:30 UTC (rev 1692)
+++ branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc	2006-06-29 12:49:47 UTC (rev 1693)
@@ -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: branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_world.qc	2006-06-29 12:47:30 UTC (rev 1692)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_world.qc	2006-06-29 12:49:47 UTC (rev 1693)
@@ -1142,7 +1142,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