From fa02f461c73551126d337e3b1eb8ba11dae50d92 Mon Sep 17 00:00:00 2001 From: Alfred Eriksson Date: Tue, 13 Jan 2009 17:58:16 +0000 Subject: fixed round count bug --- src/game/server/gamecontroller.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/game') diff --git a/src/game/server/gamecontroller.cpp b/src/game/server/gamecontroller.cpp index 4fedeefc..9fcaceae 100644 --- a/src/game/server/gamecontroller.cpp +++ b/src/game/server/gamecontroller.cpp @@ -273,6 +273,10 @@ void GAMECONTROLLER::cyclemap() while(is_separator(buf[i])) i++; + // we rotate to the same map, reset the round count! + if(str_comp_nocase(current_map, buf) == 0) + round_count = -1; + dbg_msg("game", "rotating map to %s", &buf[i]); str_copy(config.sv_map, &buf[i], sizeof(config.sv_map)); } @@ -488,7 +492,7 @@ void GAMECONTROLLER::snap(int snapping_client) gameobj->warmup = warmup; - gameobj->round_num = (strlen(config.sv_maprotation) || config.sv_rounds_per_map > 1) ? config.sv_rounds_per_map : 0; + gameobj->round_num = (strlen(config.sv_maprotation) && config.sv_rounds_per_map) ? config.sv_rounds_per_map : 0; gameobj->round_current = round_count+1; -- cgit 1.4.1