diff -Nur -X/mnt/data/freeciv-dev/freeciv/diff_ignore freeciv/server/cityturn.c codeciv/server/cityturn.c --- freeciv/server/cityturn.c Mon Jul 23 22:14:40 2001 +++ codeciv/server/cityturn.c Mon Jul 23 22:28:11 2001 @@ -1436,8 +1436,6 @@ } } - pcity->size--; - city_auto_remove_worker(pcity); } pcity->turn_last_built = game.year; @@ -1446,6 +1444,13 @@ create_unit(pplayer, pcity->x, pcity->y, pcity->currently_building, do_make_unit_veteran(pcity, pcity->currently_building), pcity->id, -1); + /* After we created the unit, so that removing the worker will take + into account the extra resources (food) needed. */ + if (unit_flag(pcity->currently_building, F_CITIES)) { + pcity->size--; + city_auto_remove_worker(pcity); + } + /* to eliminate micromanagement, we only subtract the unit's cost */ pcity->before_change_shields-=unit_value(pcity->currently_building); pcity->shield_stock-=unit_value(pcity->currently_building); Binary files freeciv/settler.gz and codeciv/settler.gz differ Binary files freeciv/settler.sav.gz and codeciv/settler.sav.gz differ