Date: Sat Dec 19 11:04:35 2015
New Revision: 31093
Fix client city dialog production breakdown for cities in disorder.
Reported by log65536@gna.
See gna bug #23957.
--- 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->unhappy_penalty[O_SHIELD],
&prod, &pop, &mod);
buf = '\0';
--- trunk/common/city.c (original)
+++ trunk/common/city.c Sat Dec 19 11:04:35 2015
@@ -2960,6 +2960,8 @@
+ /* 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]);
Freeciv-commits mailing list