--- server/cityturn.c.orig 2002-09-03 21:00:31.000000000 +0200 +++ server/cityturn.c 2002-09-03 21:35:35.000000000 +0200 @@ -566,7 +566,6 @@ **************************************************************************/ static void city_populate(struct city *pcity) { - pcity->food_stock+=pcity->food_surplus; if(pcity->food_stock >= city_granary_size(pcity->size) || city_rapture_grow(pcity)) { city_increase_size(pcity); @@ -1089,7 +1088,6 @@ **************************************************************************/ static bool city_build_stuff(struct player *pplayer, struct city *pcity) { - city_distribute_surplus_shields(pplayer, pcity); nullify_caravan_and_disband_plus(pcity); if (!pcity->is_building_unit) { @@ -1265,8 +1263,28 @@ /* reporting of celebrations rewritten, copying the treatment of disorder below, with the added rapture rounds count. 991219 -- Jing */ - if (city_build_stuff(pplayer, pcity)) { - if (city_celebrating(pcity)) { + + /* + * calculate food, production, trade of the old round + * (that should be done for all cities before they change - traderoutes) + * + * look for grow by rapturing + * decide if growing by rapturing lets more in foodbox than normal + * + * build units/improvements + * + * + * */ + + /* getting new shields and disbanding units when shieldsurplus < 0 */ + city_distribute_surplus_shields(pplayer, pcity); + pcity->food_stock+=pcity->food_surplus; + + update_tech(pplayer, pcity->science_total); + pplayer->economic.gold+=pcity->tax_total; + pay_for_buildings(pplayer, pcity); + + if (city_celebrating(pcity)) { pcity->rapture++; if (pcity->rapture == 1) notify_player_ex(pplayer, pcity->x, pcity->y, E_CITY_LOVE, @@ -1302,10 +1320,6 @@ pcity->airlift=TRUE; else pcity->airlift=FALSE; - update_tech(pplayer, pcity->science_total); - pplayer->economic.gold+=pcity->tax_total; - pay_for_buildings(pplayer, pcity); - if(city_unhappy(pcity)) { pcity->anarchy++; if (pcity->anarchy == 1) @@ -1334,7 +1348,7 @@ handle_player_revolution(pplayer); } sanity_check_city(pcity); - } + city_build_stuff(pplayer, pcity); } /**************************************************************************