about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2007-12-18 22:07:57 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2007-12-18 22:07:57 +0000
commit3c0615b835e43b5364ed5c583919d836ccb979da (patch)
treed287d3f43d1f377d02e4772469e01897ef5b4229
parent408b42625428c04da5ccb8e40182c2226ee1bfea (diff)
downloadzcatch-3c0615b835e43b5364ed5c583919d836ccb979da.tar.gz
zcatch-3c0615b835e43b5364ed5c583919d836ccb979da.zip
added tournament mode
-rw-r--r--src/engine/e_config_variables.h2
-rw-r--r--src/engine/server/es_server.c2
-rw-r--r--src/game/g_variables.h1
-rw-r--r--src/game/server/gs_server.cpp12
4 files changed, 12 insertions, 5 deletions
diff --git a/src/engine/e_config_variables.h b/src/engine/e_config_variables.h
index 9cf9a9b3..e28bca4b 100644
--- a/src/engine/e_config_variables.h
+++ b/src/engine/e_config_variables.h
@@ -50,7 +50,7 @@ MACRO_CONFIG_INT(sv_sendheartbeats, 1, 0, 1)
 MACRO_CONFIG_STR(sv_map, 128, "dm1")
 MACRO_CONFIG_INT(sv_map_reload, 0, 0, 1)
 MACRO_CONFIG_INT(sv_max_clients, 8, 1, 12)
-MACRO_CONFIG_INT(sv_bandwidth_mode, 0, 0, 2)
+MACRO_CONFIG_INT(sv_high_bandwidth, 0, 0, 1)
 
 MACRO_CONFIG_INT(debug, 0, 0, 1)
 MACRO_CONFIG_INT(dbg_stress, 0, 0, 0)
diff --git a/src/engine/server/es_server.c b/src/engine/server/es_server.c
index 23eb88a2..bafe0ec2 100644
--- a/src/engine/server/es_server.c
+++ b/src/engine/server/es_server.c
@@ -920,7 +920,7 @@ static int server_run()
 			/* snap game */
 			if(new_ticks)
 			{
-				if(config.sv_bandwidth_mode == 1 || (current_tick%2) == 0)
+				if(config.sv_high_bandwidth || (current_tick%2) == 0)
 				{
 					static PERFORMACE_INFO scope = {"snap", 0};
 					perf_start(&scope);
diff --git a/src/game/g_variables.h b/src/game/g_variables.h
index 6cd2540b..594d5cc5 100644
--- a/src/game/g_variables.h
+++ b/src/game/g_variables.h
@@ -63,6 +63,7 @@ MACRO_CONFIG_INT(sv_timelimit, 0, 0, 1000)
 MACRO_CONFIG_STR(sv_gametype, 32, "dm")
 MACRO_CONFIG_INT(sv_restart, 0, 0, 120)
 MACRO_CONFIG_INT(sv_kick, -1, 0, 0)
+MACRO_CONFIG_INT(sv_tournament_mode, 0, 0, 1)
 
 
 
diff --git a/src/game/server/gs_server.cpp b/src/game/server/gs_server.cpp
index a45e52ab..f2e20441 100644
--- a/src/game/server/gs_server.cpp
+++ b/src/game/server/gs_server.cpp
@@ -1788,11 +1788,17 @@ void mods_connected(int client_id)
 
 	//dbg_msg("game", "connected player='%d:%s'", client_id, server_clientname(client_id));
 
+	
 	// Check which team the player should be on
-	if(gameobj->gametype == GAMETYPE_DM)
-		players[client_id].team = 0;
+	if(config.sv_tournament_mode)
+		players[client_id].team = -1;
 	else
-		players[client_id].team = gameobj->getteam(client_id);
+	{
+		if(gameobj->gametype == GAMETYPE_DM)
+			players[client_id].team = 0;
+		else
+			players[client_id].team = gameobj->getteam(client_id);
+	}
 }
 
 void mods_client_drop(int client_id)