r4394 - in trunk/data: . qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Sep 7 09:32:01 EDT 2008


Author: div0
Date: 2008-09-07 09:32:01 -0400 (Sun, 07 Sep 2008)
New Revision: 4394

Modified:
   trunk/data/defaultNexuiz.cfg
   trunk/data/qcsrc/server/arena.qc
   trunk/data/qcsrc/server/cl_client.qc
   trunk/data/qcsrc/server/clientcommands.qc
   trunk/data/qcsrc/server/defs.qh
   trunk/data/qcsrc/server/g_world.qc
   trunk/data/qcsrc/server/miscfunctions.qc
   trunk/data/qcsrc/server/scores.qc
   trunk/data/qcsrc/server/sv_main.qc
   trunk/data/qcsrc/server/teamplay.qc
   trunk/data/qcsrc/server/vote.qc
Log:
fix the worst bugs in warmup


Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg	2008-09-07 11:08:23 UTC (rev 4393)
+++ trunk/data/defaultNexuiz.cfg	2008-09-07 13:32:01 UTC (rev 4394)
@@ -1,3 +1,6 @@
+// Nexuiz version (formatted for humans)
+set g_nexuizversion 2.4svn
+
 // changes a cvar and reports it to the server (for the menu to notify the
 // server about changes)
 alias setreport "set $1 $2 ; sendcvar $1"
@@ -2,4 +5,6 @@
 
-// Nexuiz version (formatted for humans)
-set g_nexuizversion 2.4svn
+// detect dedicated server
+alias "_detect_dedicated_$qport" "$*"
+alias "_detect_dedicated_0" ""
+alias if_dedicated "_detect_dedicated_$qport $*"
 
@@ -137,19 +142,25 @@
 set g_maxplayers_spectator_blocktime 5 //if the players voted for the "nospectators" command, this setting defines the number of seconds a observer/spectator has time to join the game before he gets kicked
 
 //tournament mod
-set g_tourney 1 //enables tourney mode which splits the game into a warmup- and match-stage
-set g_tourney_warmup_limit 60 //if set to -1 the warmup-stage is not affected by any timelimit, if set to 0 the usual timelimit also affects warmup-stage, otherwise warmup will be limited to this time (useful for public matches)
-set g_tourney_warmup_allow_timeout 0 //if set to 0 you cannot use the calltimeout command during the warmup-stage but only during the match stage
-set g_tourney_warmup_allguns 0 //if set players start with all guns in warmup mode
-set g_tourney_disable_spec_chat 1 //if set the chat sent by spectators or observers while being in match-stage can only seen by other specs/observers
-set g_tourney_disable_spec_vote 1 //if set only players can call a vote during the match-stage (thus spectators and observers can't call a vote then)
-set g_tourney_start_health 250 //starting values when being in warmup-stage
-set g_tourney_start_armor 100
-set g_tourney_start_ammo_shells 50
-set g_tourney_start_ammo_nails 150
-set g_tourney_start_ammo_rockets 50
-set g_tourney_start_ammo_cells 50
+set g_warmup 0 //split the game into a warmup- and match-stage
+	if_dedicated set g_warmup 1
+set g_warmup_limit 60 //if set to -1 the warmup-stage is not affected by any timelimit, if set to 0 the usual timelimit also affects warmup-stage, otherwise warmup will be limited to this time (useful for public matches)
+set g_warmup_allow_timeout 0 //if set to 0 you cannot use the calltimeout command during the warmup-stage but only during the match stage
+set g_warmup_allguns 0 //if set players start with all guns in warmup mode
+set g_warmup_start_health 250 //starting values when being in warmup-stage
+set g_warmup_start_armor 100
+set g_warmup_start_ammo_shells 50
+set g_warmup_start_ammo_nails 150
+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)
+
+alias g_tourney "g_tourney_$1"
+alias g_tourney_1 "g_warmup 1; g_chat_nospectators 1; sv_vote_nospectators 1"
+alias g_tourney_0 "g_warmup 0; g_chat_nospectators 0; sv_vote_nospectators 0"
+
 set sv_timeout 0 //allows a player to call a timeout, this will pause the game for some time
 set sv_timeout_length 120 //how long the game will be paused at max, in seconds
 set sv_timeout_number 2 //how many timeouts one player is allowed to call (gets reset after a restart)
@@ -576,7 +587,6 @@
 sv_clmovement_waitforinput 2
 
 // startmap_dm is used when running with the -listen or -dedicated commandline options
-alias startmap_sp "set _sv_init 1; map aggressor"
 alias startmap_dm "set _sv_init 1; map aggressor"
 
 // aliases:

Modified: trunk/data/qcsrc/server/arena.qc
===================================================================
--- trunk/data/qcsrc/server/arena.qc	2008-09-07 11:08:23 UTC (rev 4393)
+++ trunk/data/qcsrc/server/arena.qc	2008-09-07 13:32:01 UTC (rev 4394)
@@ -149,8 +149,6 @@
 	if(g_arena)
 	if(champion)
 		UpdateFrags(champion, +1);
-
-	Score_ClearAll();
 }
 
 void Spawnqueue_Insert(entity e)

Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc	2008-09-07 11:08:23 UTC (rev 4393)
+++ trunk/data/qcsrc/server/cl_client.qc	2008-09-07 13:32:01 UTC (rev 4394)
@@ -586,14 +586,6 @@
 		WriteEntity(MSG_ONE, self);
 	}
 
-	if(g_tourney)
-	{
-		msg_entity = self;
-		WriteByte(MSG_ONE, SVC_TEMPENTITY);
-		WriteByte(MSG_ONE, TE_CSQC_WARMUP);
-		WriteByte(MSG_ONE, !tourneyInMatchStage);
-	}
-
 	// player is dead and becomes observer
 	// FIXME fix LMS scoring for new system
 	if(g_lms)
@@ -635,16 +627,29 @@
 		self.air_finished = time + 12;
 		self.dmg = 2;
 
-		self.ammo_shells = start_ammo_shells;
-		self.ammo_nails = start_ammo_nails;
-		self.ammo_rockets = start_ammo_rockets;
-		self.ammo_cells = start_ammo_cells;
-		self.health = start_health;
-		self.armorvalue = start_armorvalue;
+		if(inWarmupStage)
+		{
+			self.ammo_shells = warmup_start_ammo_shells;
+			self.ammo_nails = warmup_start_ammo_nails;
+			self.ammo_rockets = warmup_start_ammo_rockets;
+			self.ammo_cells = warmup_start_ammo_cells;
+			self.health = warmup_start_health;
+			self.armorvalue = warmup_start_armorvalue;
+			self.weapons = warmup_start_weapons;
+		}
+		else
+		{
+			self.ammo_shells = start_ammo_shells;
+			self.ammo_nails = start_ammo_nails;
+			self.ammo_rockets = start_ammo_rockets;
+			self.ammo_cells = start_ammo_cells;
+			self.health = start_health;
+			self.armorvalue = start_armorvalue;
+			self.weapons = start_weapons;
+		}
 		self.items = start_items;
-		self.weapons = start_weapons;
-		self.switchweapon = start_switchweapon;
-		self.cnt = start_switchweapon;
+		self.switchweapon = w_getbestweapon(self);
+		self.cnt = self.switchweapon;
 		self.weapon = 0;
 		self.jump_interval = time;
 
@@ -1081,7 +1086,7 @@
 	//	dom_player_join_team(self);
 
 	//JoinBestTeam(self, FALSE, FALSE);
-
+	//
 	if((cvar("sv_spectate") == 1 && !g_lms) || cvar("g_campaign")) {
 		self.classname = "observer";
 	} else {
@@ -1198,6 +1203,14 @@
 		ScoreInfo_Write(MSG_ONE);
 	}
 
+	if(inWarmupStage)
+	{
+		msg_entity = self;
+		WriteByte(MSG_ONE, SVC_TEMPENTITY);
+		WriteByte(MSG_ONE, TE_CSQC_WARMUP);
+		WriteByte(MSG_ONE, 1);
+	}
+
 	if(g_lms)
 	{
 		if(PlayerScore_Add(self, SP_LMS_LIVES, LMS_NewPlayerLives()) <= 0)

Modified: trunk/data/qcsrc/server/clientcommands.qc
===================================================================
--- trunk/data/qcsrc/server/clientcommands.qc	2008-09-07 11:08:23 UTC (rev 4393)
+++ trunk/data/qcsrc/server/clientcommands.qc	2008-09-07 13:32:01 UTC (rev 4394)
@@ -122,9 +122,7 @@
 	}
 	else
 	{
-		//when g_tourney is active and g_tourney_disable_spec_chat is set and game is in matchstage
-		//don't print the text from specs/observers to the players but only the other spectators
-		if(g_tourney && cvar("g_tourney_disable_spec_chat") && tourneyInMatchStage && source.classname != "player") {
+		if(cvar("g_chat_nospectators") && source.classname != "player") {
 			FOR_EACH_REALCLIENT(head) if(head.classname != "player") {
 				sprint(head, msgstr);
 			}
@@ -265,7 +263,7 @@
 	} else if(argv(0) == "ready") {
 		if not(self.flags & FL_CLIENT)
 			return;
-		if((g_tourney && 0 < g_tourney_warmup_limit) // with unlimited warmup players have to be able to restart
+		if((inWarmupStage && 0 < g_warmup_limit) // with unlimited warmup players have to be able to restart
 		   || cvar("sv_ready_restart"))
 		{
 			if(timeoutStatus) {
@@ -399,25 +397,10 @@
 		remove(readyNagger);
 	}
 
-	if(g_tourney) {
-		tourneyInMatchStage = 1; //once the game is restarted the game is in match stage
-		//reset weapons and ammo, health and armor to default:
-		readplayerstartcvars();
-	}
 	restart_countdown = time + RESTART_COUNTDOWN;
 	restart_mapalreadyrestarted = 0; //reset this var, needed when cvar sv_ready_restart_repeatable is in use
-	//reset the .ready status of all players (also spectators)
-	FOR_EACH_CLIENTSLOT(e)
+	if(0 < cvar("timelimit") || inWarmupStage)
 	{
-		msg_entity = e;
-		WriteByte(MSG_ONE, SVC_TEMPENTITY);
-		WriteByte(MSG_ONE, TE_CSQC_WARMUP);
-		WriteByte(MSG_ONE, !tourneyInMatchStage);
-
-		e.ready = 0;
-	}
-	if(0<cvar("timelimit") || (g_tourney && (-1 == g_tourney_warmup_limit)) )
-	{
 		// remember original timelimit on first restart
 		if(!timelimit_orig)
 			timelimit_orig = cvar("timelimit");
@@ -426,6 +409,19 @@
 			cvar_set("timelimit", ftos(timelimit_orig + ceil(restart_countdown)/60));
 	}
 
+	inWarmupStage = 0; //once the game is restarted the game is in match stage
+
+	//reset the .ready status of all players (also spectators)
+	FOR_EACH_CLIENTSLOT(e)
+		e.ready = 0;
+	FOR_EACH_REALCLIENT(e)
+	{
+		msg_entity = e;
+		WriteByte(MSG_ONE, SVC_TEMPENTITY);
+		WriteByte(MSG_ONE, TE_CSQC_WARMUP);
+		WriteByte(MSG_ONE, 0);
+	}
+
 	if(cvar("teamplay_lockonrestart") && teams_matter) {
 		lockteams = 1;
 		bprint("^1The teams are now locked.\n");
@@ -441,9 +437,7 @@
 	if(cvar("sv_timeout"))
 	{
 		FOR_EACH_REALPLAYER(e)
-		{
 			e.allowedTimeouts = cvar("sv_timeout_number");
-		}
 	}
 
 	//play the prepareforbattle sound to everyone
@@ -452,6 +446,9 @@
 	//reset map immediately if this cvar is not set
 	if (!cvar("sv_ready_restart_after_countdown"))
 		reset_map();
+
+	// reset ALL scores
+	Score_ClearAll();
 	
 	if(cvar("sv_eventlog"))
 		GameLogEcho(":restart");
@@ -586,7 +583,7 @@
  * This function is called when a player issues the calltimeout command.
  */
 void evaluateTimeoutCall() {
-	if (g_tourney && !tourneyInMatchStage && !cvar("g_tourney_warmup_allow_timeout"))
+	if (inWarmupStage && !g_warmup_allow_timeout)
 		return sprint(self, "^7Error: You can not call a timeout in warmup-stage!\n");
 	if (time < restart_countdown )
 		return sprint(self, "^7Error: You can not call a timeout while the map is being restarted!\n");

Modified: trunk/data/qcsrc/server/defs.qh
===================================================================
--- trunk/data/qcsrc/server/defs.qh	2008-09-07 11:08:23 UTC (rev 4393)
+++ trunk/data/qcsrc/server/defs.qh	2008-09-07 13:32:01 UTC (rev 4394)
@@ -18,12 +18,13 @@
 
 float g_dm, g_domination, g_ctf, g_tdm, g_keyhunt, g_onslaught, g_assault, g_arena, g_lms, g_runematch, g_race;
 float g_cloaked, g_footsteps, g_jump_grunt, g_grappling_hook, g_laserguided_missile, g_midair, g_minstagib, g_nixnex, g_nixnex_with_laser, g_norecoil, g_rocketarena, g_vampire, g_minstagib_invis_alpha;
-float g_tourney;
-float g_tourney_warmup_limit;
-float g_tourney_warmup_allguns;
+float g_warmup;
+float g_warmup_limit;
+float g_warmup_allguns;
+float g_warmup_allow_timeout;
 float g_ctf_win_mode;
 float g_race_qualifying;
-float tourneyInMatchStage;
+float inWarmupStage;
 float g_pickup_respawntime_short;
 float g_pickup_respawntime_medium;
 float g_pickup_respawntime_long;

Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc	2008-09-07 11:08:23 UTC (rev 4393)
+++ trunk/data/qcsrc/server/g_world.qc	2008-09-07 13:32:01 UTC (rev 4394)
@@ -316,7 +316,7 @@
 	MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 1);
 
 	//if tourney is used map starts in warmup mode. if this mode shall stay unlimited, reset timelimit, but save the original one
-	if(g_tourney && (-1 == g_tourney_warmup_limit)) {
+	if(inWarmupStage) {
 		timelimit_orig = cvar("timelimit");
 		cvar_set("timelimit", "0");
 	}
@@ -1577,6 +1577,9 @@
 	timelimit = cvar("timelimit") * 60;
 	fraglimit = cvar("fraglimit");
 
+	if(inWarmupStage)
+		fraglimit = 0; // no fraglimit for now
+
 	if(checkrules_overtimeend)
 	{
 		if(!checkrules_overtimewarning)

Modified: trunk/data/qcsrc/server/miscfunctions.qc
===================================================================
--- trunk/data/qcsrc/server/miscfunctions.qc	2008-09-07 11:08:23 UTC (rev 4393)
+++ trunk/data/qcsrc/server/miscfunctions.qc	2008-09-07 13:32:01 UTC (rev 4394)
@@ -702,13 +702,19 @@
 
 float start_weapons;
 float start_items;
-float start_switchweapon;
 float start_ammo_shells;
 float start_ammo_nails;
 float start_ammo_rockets;
 float start_ammo_cells;
 float start_health;
 float start_armorvalue;
+float warmup_start_weapons;
+float warmup_start_ammo_shells;
+float warmup_start_ammo_nails;
+float warmup_start_ammo_rockets;
+float warmup_start_ammo_cells;
+float warmup_start_health;
+float warmup_start_armorvalue;
 
 entity get_weaponinfo(float w);
 
@@ -720,7 +726,6 @@
   	// initialize starting values for players
 	start_weapons = 0;
 	start_items = 0;
-	start_switchweapon = 0;
 	start_ammo_shells = 0;
 	start_ammo_nails = 0;
 	start_ammo_rockets = 0;
@@ -731,8 +736,7 @@
 	if(g_rocketarena)
 	{
 		start_weapons = WEPBIT_ROCKET_LAUNCHER;
-		start_switchweapon = WEP_ROCKET_LAUNCHER;
-		weapon_action(start_switchweapon, WR_PRECACHE);
+		weapon_action(WEP_ROCKET_LAUNCHER, WR_PRECACHE);
 		start_ammo_rockets = 999;
 		start_items |= IT_UNLIMITED_AMMO;
 	}
@@ -746,8 +750,7 @@
 		start_health = 100;
 		start_armorvalue = 0;
 		start_weapons = WEPBIT_MINSTANEX;
-		start_switchweapon = WEP_MINSTANEX;
-		weapon_action(start_switchweapon, WR_PRECACHE);
+		weapon_action(WEP_MINSTANEX, WR_PRECACHE);
 		start_ammo_cells = cvar("g_minstagib_ammo_start");
 		g_minstagib_invis_alpha = cvar("g_minstagib_invis_alpha");
 	}
@@ -761,16 +764,7 @@
 			start_ammo_cells = cvar("g_lms_start_ammo_cells");
 			start_health = cvar("g_lms_start_health");
 			start_armorvalue = cvar("g_lms_start_armor");
-		}
-		else if(g_tourney && !tourneyInMatchStage) {
-			start_ammo_shells = cvar("g_tourney_start_ammo_shells");
-			start_ammo_nails = cvar("g_tourney_start_ammo_nails");
-			start_ammo_rockets = cvar("g_tourney_start_ammo_rockets");
-			start_ammo_cells = cvar("g_tourney_start_ammo_cells");
-			start_health = cvar("g_tourney_start_health");
-			start_armorvalue = cvar("g_tourney_start_armor");
-		}
-		else if (cvar("g_use_ammunition")) {
+		} else if (cvar("g_use_ammunition")) {
 			start_ammo_shells = cvar("g_start_ammo_shells");
 			start_ammo_nails = cvar("g_start_ammo_nails");
 			start_ammo_rockets = cvar("g_start_ammo_rockets");
@@ -788,14 +782,51 @@
 			e = get_weaponinfo(i);
 			if(!(e.weapon))
 				continue;
-			if(((e.spawnflags & 1) && (g_lms || (g_tourney && g_tourney_warmup_allguns))) || cvar(strcat("g_start_weapon_", e.netname)))
+			if(((e.spawnflags & 1) && g_lms) || cvar(strcat("g_start_weapon_", e.netname)))
 			{
 				start_weapons |= e.weapons;
-				start_switchweapon = e.weapon;
 				weapon_action(e.weapon, WR_PRECACHE);
 			}
 		}
 	}
+
+	if(inWarmupStage)
+	{
+		warmup_start_ammo_shells = start_ammo_shells;
+		warmup_start_ammo_nails = start_ammo_nails;
+		warmup_start_ammo_rockets = start_ammo_rockets;
+		warmup_start_ammo_cells = start_ammo_cells;
+		warmup_start_health = start_health;
+		warmup_start_armorvalue = start_armorvalue;
+		warmup_start_weapons = start_weapons;
+
+		if(!g_rocketarena && !g_nixnex && !g_minstagib)
+		{
+			if(cvar("g_use_ammunition"))
+			{
+				warmup_start_ammo_shells = cvar("g_warmup_start_ammo_shells");
+				warmup_start_ammo_cells = cvar("g_warmup_start_ammo_cells");
+				warmup_start_ammo_nails = cvar("g_warmup_start_ammo_nails");
+				warmup_start_ammo_rockets = cvar("g_warmup_start_ammo_rockets");
+			}
+			warmup_start_health = cvar("g_warmup_start_health");
+			warmup_start_armorvalue = cvar("g_warmup_start_armor");
+			if(cvar("g_warmup_allguns"))
+			{
+				for(i = WEP_FIRST; i <= WEP_LAST; ++i)
+				{
+					e = get_weaponinfo(i);
+					if(!(e.weapon))
+						continue;
+					if(e.spawnflags & 1)
+					{
+						warmup_start_weapons |= e.weapons;
+						weapon_action(e.weapon, WR_PRECACHE);
+					}
+				}
+			}
+		}
+	}
 }
 
 void readlevelcvars(void)
@@ -815,17 +846,19 @@
 	g_norecoil = cvar("g_norecoil");
 	g_rocketarena = cvar("g_rocketarena");
 	g_vampire = cvar("g_vampire");
-	g_tourney = cvar("g_tourney");
-	g_tourney_warmup_limit = cvar("g_tourney_warmup_limit");
-	g_tourney_warmup_allguns = cvar("g_tourney_warmup_allguns");
 	sv_maxidle = cvar("sv_maxidle");
 	sv_maxidle_spectatorsareidle = cvar("sv_maxidle_spectatorsareidle");
 	sv_pogostick = cvar("sv_pogostick");
 	sv_doublejump = cvar("sv_doublejump");
 
-	if(g_race && g_race_qualifying == 2)
-		g_tourney = 0; // these modes cannot work together
+	inWarmupStage = cvar("g_warmup");
+	g_warmup_limit = cvar("g_warmup_limit");
+	g_warmup_allguns = cvar("g_warmup_allguns");
+	g_warmup_allow_timeout = cvar("g_warmup_allow_timeout");
 
+	if(g_race && g_race_qualifying == 2 || g_arena || g_assault || cvar("g_campaign"))
+		inWarmupStage = 0; // these modes cannot work together, sorry
+
 	g_pickup_respawntime_short = cvar("g_pickup_respawntime_short");
 	g_pickup_respawntime_medium = cvar("g_pickup_respawntime_medium");
 	g_pickup_respawntime_long = cvar("g_pickup_respawntime_long");

Modified: trunk/data/qcsrc/server/scores.qc
===================================================================
--- trunk/data/qcsrc/server/scores.qc	2008-09-07 11:08:23 UTC (rev 4393)
+++ trunk/data/qcsrc/server/scores.qc	2008-09-07 13:32:01 UTC (rev 4394)
@@ -258,7 +258,7 @@
 		sk = teamscorekeepers[t];
 		if(!sk)
 			continue;
-		for(i = 0; i < MAX_SCORE; ++i)
+		for(i = 0; i < MAX_TEAMSCORE; ++i)
 		{
 			if(sk.(teamscores[i]) != 0)
 				if(teamscores_label[i] != "")

Modified: trunk/data/qcsrc/server/sv_main.qc
===================================================================
--- trunk/data/qcsrc/server/sv_main.qc	2008-09-07 11:08:23 UTC (rev 4393)
+++ trunk/data/qcsrc/server/sv_main.qc	2008-09-07 13:32:01 UTC (rev 4394)
@@ -153,10 +153,9 @@
 	Spawnqueue_Check();
 
 	// if in warmup stage and limit for warmup is hit start match
-	if (g_tourney
-	    && !tourneyInMatchStage
-	    && 0 < g_tourney_warmup_limit
-	    && (time + RESTART_COUNTDOWN) >= g_tourney_warmup_limit)
+	if (inWarmupStage
+	    && 0 < g_warmup_limit
+	    && (time + RESTART_COUNTDOWN) >= g_warmup_limit)
 	{
 		ReadyRestart();
 		return;

Modified: trunk/data/qcsrc/server/teamplay.qc
===================================================================
--- trunk/data/qcsrc/server/teamplay.qc	2008-09-07 11:08:23 UTC (rev 4393)
+++ trunk/data/qcsrc/server/teamplay.qc	2008-09-07 13:32:01 UTC (rev 4394)
@@ -407,12 +407,6 @@
 		}
 		modifications = strcat(modifications, "laser-guided-missiles");
 	}
-	if(g_tourney) {
-		if (modifications) {
-			modifications = strcat(modifications, ", ");
-		}
-		modifications = strcat(modifications, "Tournament");
-	}
 
 	local string versionmessage;
 	versionmessage = GetClientVersionMessage();
@@ -423,13 +417,6 @@
 	if(modifications != "")
 		s = strcat(s, "^8\nactive modifications: ^3", modifications, "^8\n");
 
-	if(g_tourney) {
-		if(!tourneyInMatchStage)
-			s = strcat(s, "\n^8The game is currently in ^3warmup-stage ^8!\n");
-		else
-			s = strcat(s, "\n^8The game is currently in ^3match-stage ^8!\n");
-	}
-
 	if(time < restart_countdown)
 		s = strcat(s, "\n^1Game starts in ", ftos(restartAnnouncer.cnt + 1), " seconds^7");
 

Modified: trunk/data/qcsrc/server/vote.qc
===================================================================
--- trunk/data/qcsrc/server/vote.qc	2008-09-07 11:08:23 UTC (rev 4393)
+++ trunk/data/qcsrc/server/vote.qc	2008-09-07 13:32:01 UTC (rev 4394)
@@ -76,9 +76,7 @@
 			}
 		} else if(argv(1) == "call") {
 			if(!e || cvar("sv_vote_call")) {
-				if(tourneyInMatchStage
-				   && cvar("g_tourney_disable_spec_vote")
-				   && e.classname != "player") {
+				if(cvar("sv_vote_nospectators") && e.classname != "player") {
 					print_to(e, "^1Error: Only players can call a vote during the match-stage.");
 				}
 				else if(timeoutStatus) { //don't allow a vote call during a timeout
@@ -432,17 +430,7 @@
 			votecaller.vote_master = 1;
 		}
 	} else {
-		//in g_tourney mode and if the vote is a timelimit-change, don't change it immediately but after restart
-		if(g_tourney && substring(votecalledvote, 0, 10) == "timelimit ") {
-			if( stof(substring(votecalledvote, 10, strlen(votecalledvote) - 10)) > 0 ) {
-				timelimit_orig = stof(substring(votecalledvote, 10, strlen(votecalledvote) - 10));
-				bprint(strcat("The timelimit will be set to ", ftos(timelimit_orig), " minutes after the next restart!\n"));
-			}
-			else //calls like "timelimit -1" can pass immediately
-				localcmd(strcat(votecalledvote, "\n"));
-		}
-		else
-			localcmd(strcat(votecalledvote, "\n"));
+		localcmd(strcat(votecalledvote, "\n"));
 	}
 	if(votecaller) {
 		votecaller.vote_next = 0; // people like your votes,
@@ -551,7 +539,7 @@
 	}
 
 	//in tournament mode, if we have at least one player then don't make the vote dependent on spectators (so specs don't have to press F1)
-	if(g_tourney)
+	if(cvar("sv_vote_nospectators"))
 	if(realplayercount > 0) {
 		yescount = realplayeryescount;
 		nocount = realplayernocount;




More information about the nexuiz-commits mailing list