From 6c98a36f0f5b583c4aa5476b742d9046a53f1b7f Mon Sep 17 00:00:00 2001 From: Alfred Eriksson Date: Sat, 17 Jan 2009 16:18:47 +0000 Subject: [PATCH] fixed round count bug #630 --- src/game/server/gamecontroller.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/game/server/gamecontroller.cpp b/src/game/server/gamecontroller.cpp index 9fcaceae7..cdbace8e4 100644 --- a/src/game/server/gamecontroller.cpp +++ b/src/game/server/gamecontroller.cpp @@ -202,7 +202,6 @@ void GAMECONTROLLER::startround() teamscore[1] = 0; unbalanced_tick = -1; force_balanced = false; - round_count++; dbg_msg("game","start round type='%s' teamplay='%d'", gametype, game_flags&GAMEFLAG_TEAMS); } @@ -219,6 +218,7 @@ void GAMECONTROLLER::cyclemap() dbg_msg("game", "rotating map to %s", map_wish); str_copy(config.sv_map, map_wish, sizeof(config.sv_map)); map_wish[0] = 0; + round_count = 0; return; } if(!strlen(config.sv_maprotation)) @@ -273,9 +273,7 @@ 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; + round_count = 0; dbg_msg("game", "rotating map to %s", &buf[i]); str_copy(config.sv_map, &buf[i], sizeof(config.sv_map)); @@ -387,6 +385,7 @@ void GAMECONTROLLER::tick() { cyclemap(); startround(); + round_count++; } }