Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2004:
[Freeciv-Dev] (PR#9247) cm shouldn't count waste as a good thing
Home

[Freeciv-Dev] (PR#9247) cm shouldn't count waste as a good thing

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#9247) cm shouldn't count waste as a good thing
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 9 Jul 2004 11:05:20 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9247 >

Here's a patch.  It also fixes a similar bug in print_city, and fixes
some typos (wrong values output) in print_city.

jason

Index: common/aicore/cm.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/aicore/cm.c,v
retrieving revision 1.28
diff -u -r1.28 cm.c
--- common/aicore/cm.c  25 Jun 2004 23:35:55 -0000      1.28
+++ common/aicore/cm.c  9 Jul 2004 18:04:14 -0000
@@ -356,9 +356,9 @@
   freelog(LOG_NORMAL, "  food    = %3d (%+3d)",
          pcity->food_prod, pcity->food_surplus);
   freelog(LOG_NORMAL, "  shield  = %3d (%+3d)",
-         pcity->shield_prod + pcity->shield_waste, pcity->shield_prod);
+         pcity->shield_prod, pcity->shield_surplus);
   freelog(LOG_NORMAL, "  trade   = %3d (%+3d)",
-         pcity->trade_prod + pcity->corruption, pcity->trade_prod);
+         pcity->trade_prod, pcity->trade_surplus);
 
   freelog(LOG_NORMAL, "  gold    = %3d (%+3d)", pcity->tax_total,
          city_gold_surplus(pcity));
@@ -451,8 +451,8 @@
 static void copy_stats(struct city *pcity, struct cm_result *result)
 {
   result->production[FOOD] = pcity->food_prod;
-  result->production[SHIELD] = pcity->shield_prod + pcity->shield_waste;
-  result->production[TRADE] = pcity->trade_prod + pcity->corruption;
+  result->production[SHIELD] = pcity->shield_prod;
+  result->production[TRADE] = pcity->trade_prod;
 
   result->surplus[FOOD] = pcity->food_surplus;
   result->surplus[SHIELD] = pcity->shield_surplus;

[Prev in Thread] Current Thread [Next in Thread]