mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fixed round count bug #630
This commit is contained in:
parent
843690e85c
commit
6c98a36f0f
|
@ -202,7 +202,6 @@ void GAMECONTROLLER::startround()
|
||||||
teamscore[1] = 0;
|
teamscore[1] = 0;
|
||||||
unbalanced_tick = -1;
|
unbalanced_tick = -1;
|
||||||
force_balanced = false;
|
force_balanced = false;
|
||||||
round_count++;
|
|
||||||
dbg_msg("game","start round type='%s' teamplay='%d'", gametype, game_flags&GAMEFLAG_TEAMS);
|
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);
|
dbg_msg("game", "rotating map to %s", map_wish);
|
||||||
str_copy(config.sv_map, map_wish, sizeof(config.sv_map));
|
str_copy(config.sv_map, map_wish, sizeof(config.sv_map));
|
||||||
map_wish[0] = 0;
|
map_wish[0] = 0;
|
||||||
|
round_count = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!strlen(config.sv_maprotation))
|
if(!strlen(config.sv_maprotation))
|
||||||
|
@ -273,9 +273,7 @@ void GAMECONTROLLER::cyclemap()
|
||||||
while(is_separator(buf[i]))
|
while(is_separator(buf[i]))
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
// we rotate to the same map, reset the round count!
|
round_count = 0;
|
||||||
if(str_comp_nocase(current_map, buf) == 0)
|
|
||||||
round_count = -1;
|
|
||||||
|
|
||||||
dbg_msg("game", "rotating map to %s", &buf[i]);
|
dbg_msg("game", "rotating map to %s", &buf[i]);
|
||||||
str_copy(config.sv_map, &buf[i], sizeof(config.sv_map));
|
str_copy(config.sv_map, &buf[i], sizeof(config.sv_map));
|
||||||
|
@ -387,6 +385,7 @@ void GAMECONTROLLER::tick()
|
||||||
{
|
{
|
||||||
cyclemap();
|
cyclemap();
|
||||||
startround();
|
startround();
|
||||||
|
round_count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue