Skip to content

Commit

Permalink
Correct endturn statistics
Browse files Browse the repository at this point in the history
Ported from: freeciv/freeciv@d3d1a96
Fixes #1075
  • Loading branch information
psampathkumar authored and lmoureaux committed Jul 14, 2022
1 parent 8d2f2d8 commit 0261129
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/srv_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1499,8 +1499,6 @@ void end_phase()
*/
void end_turn()
{
int food = 0, shields = 0, trade = 0, settlers = 0;

QElapsedTimer timer;
timer.start();
log_debug("Endturn");
Expand All @@ -1525,13 +1523,15 @@ void end_turn()
if (!is_ai(pplayer) || is_barbarian(pplayer)) {
continue;
}
int settlers = 0;
unit_list_iterate(pplayer->units, punit)
{
if (unit_is_cityfounder(punit)) {
settlers++;
}
}
unit_list_iterate_end;
int food = 0, shields = 0, trade = 0;
city_list_iterate(pplayer->cities, pcity)
{
shields += pcity->prod[O_SHIELD];
Expand Down

0 comments on commit 0261129

Please sign in to comment.