Author: jtn Date: Sat Dec 19 11:04:35 2015 New Revision: 31093 URL: http://svn.gna.org/viewcvs/freeciv?rev=31093&view=rev Log: Fix client city dialog production breakdown for cities in disorder.
Reported by log65536@gna. See gna bug #23957. Modified: trunk/client/citydlg_common.c trunk/common/city.c Modified: trunk/client/citydlg_common.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/citydlg_common.c?rev=31093&r1=31092&r2=31093&view=diff ============================================================================== --- trunk/client/citydlg_common.c (original) +++ trunk/client/citydlg_common.c Sat Dec 19 11:04:35 2015 @@ -690,7 +690,11 @@ { int pollu, prod, pop, mod; - pollu = city_pollution_types(pcity, pcity->prod[O_SHIELD], + /* On the server, pollution is calculated before production is deducted + * for disorder; we need to compensate for that */ + pollu = city_pollution_types(pcity, + pcity->prod[O_SHIELD] + + pcity->unhappy_penalty[O_SHIELD], &prod, &pop, &mod); buf[0] = '\0'; Modified: trunk/common/city.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/city.c?rev=31093&r1=31092&r2=31093&view=diff ============================================================================== --- trunk/common/city.c (original) +++ trunk/common/city.c Sat Dec 19 11:04:35 2015 @@ -2960,6 +2960,8 @@ set_city_production(pcity); citizen_base_mood(pcity); + /* Note that pollution is calculated before unhappy_city_check() makes + * deductions for disorder; so a city in disorder still causes pollution */ pcity->pollution = city_pollution(pcity, pcity->prod[O_SHIELD]); happy_copy(pcity, FEELING_LUXURY); _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits