Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2002:
[Freeciv-Dev] Re: Economy report (PR#1307)
Home

[Freeciv-Dev] Re: Economy report (PR#1307)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Economy report (PR#1307)
From: jdorje@xxxxxxxxxxxxxxxxxxxxx
Date: Fri, 8 Mar 2002 04:26:08 -0800 (PST)

Christian Knoke wrote:
CVS 08 MAR 2002

The income in the economy report is irrational high.

Savegame available.

That'd be a big oops...

jason
Index: client/gui-gtk/repodlgs.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/repodlgs.c,v
retrieving revision 1.54
diff -u -r1.54 repodlgs.c
--- client/gui-gtk/repodlgs.c   2002/03/06 10:05:33     1.54
+++ client/gui-gtk/repodlgs.c   2002/03/08 12:24:31
@@ -727,7 +727,7 @@
     char   buf3 [64];
     gchar *row  [4];
     char economy_total[48];
-    struct city *pcity;
+    struct city *pcity_0;
     
     gtk_clist_freeze(GTK_CLIST(economy_list));
     gtk_clist_clear(GTK_CLIST(economy_list));
@@ -740,8 +740,8 @@
     row[2] = buf2;
     row[3] = buf3;
 
-    pcity = city_list_get(&game.player_ptr->cities,0);
-    if(pcity)  {
+    pcity_0 = city_list_get(&game.player_ptr->cities, 0);
+    if(pcity_0)  {
       impr_type_iterate(j) {
         if(!is_wonder(j)) {
           count = 0; 
@@ -749,10 +749,10 @@
             if (city_got_building(pcity, j)) count++;
           city_list_iterate_end;
           if (!count) continue;
-         cost = count * improvement_upkeep(pcity, j);
+         cost = count * improvement_upkeep(pcity_0, j);
          my_snprintf(buf0, sizeof(buf0), "%-20s", get_improvement_name(j));
          my_snprintf(buf1, sizeof(buf1), "%5d", count);
-         my_snprintf(buf2, sizeof(buf2), "%5d", improvement_upkeep(pcity, j));
+         my_snprintf(buf2, sizeof(buf2), "%5d", improvement_upkeep(pcity_0, 
j));
          my_snprintf(buf3, sizeof(buf3), "%6d", cost);
 
          gtk_clist_append(GTK_CLIST(economy_list), row);
@@ -761,14 +761,14 @@
          economy_improvement_type[k] = j;
          k++;
         }
-        city_list_iterate(game.player_ptr->cities,pcity) {
-          tax += pcity->tax_total;
-          if (!pcity->is_building_unit && 
-             pcity->currently_building == B_CAPITAL) {
-           tax += pcity->shield_surplus;
-          }
-        } city_list_iterate_end;
       } impr_type_iterate_end;
+      city_list_iterate(game.player_ptr->cities, pcity) {
+        tax += pcity->tax_total;
+        if (!pcity->is_building_unit &&
+           pcity->currently_building == B_CAPITAL) {
+         tax += pcity->shield_surplus;
+        }
+      } city_list_iterate_end;
     } 
 
     my_snprintf(economy_total, sizeof(economy_total),

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