Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2003:
[Freeciv-Dev] (PR#4048) Update Economy Dlg. after tax rates change.
Home

[Freeciv-Dev] (PR#4048) Update Economy Dlg. after tax rates change.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#4048) Update Economy Dlg. after tax rates change.
From: "Rafa³ Bursig" <bursig@xxxxxxxxx>
Date: Mon, 21 Apr 2003 10:43:40 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Hi

This patch allow update of economy report dlg. after player info 
package come. It is usefull when you have open economy dlg., and change 
tax rates (to see the result). I need this functionality becouse I 
merge tax rates dlg. with economy report dlg. in SDLClient but I think 
that this will be usefull to other clients.

This code fix some problems under server side that server should update 
cities (send cities infos) first and then send player info to client 
(client must have correct city info to calculate tax income).
Patch swap seqence of sending cities and player infos to client after 
change tax rates.

Rafal

----------------------------------------------------------------------
Ponad 100 tysiecy facetow szukajacych przyjaciolki, kochanki, zony, 
dziewczyny... Czekamy! >>> http://link.interia.pl/f170e

diff -u -r ../fc/freeciv/client/packhand.c fc/client/packhand.c
--- ../fc/freeciv/client/packhand.c     Mon Apr 21 12:54:21 2003
+++ fc/client/packhand.c        Mon Apr 21 13:09:40 2003
@@ -1340,7 +1340,8 @@
         do this. (applys in other cases as well.) */
       if (get_unit_in_focus())
        update_menus();
-    } 
+    }
+    economy_report_dialog_update();
   }
 
   if (pplayer == game.player_ptr && pplayer->turn_done != pinfo->turn_done) {
diff -u -r ../fc/freeciv/server/plrhand.c fc/server/plrhand.c
--- ../fc/freeciv/server/plrhand.c      Mon Apr 21 12:54:28 2003
+++ fc/server/plrhand.c Mon Apr 21 13:05:45 2003
@@ -672,8 +672,8 @@
            get_nation_name_plural(pplayer->nation), preq->tax, preq->luxury,
            preq->science);
     conn_list_do_buffer(&pplayer->connections);
-    send_player_info(pplayer, pplayer);
     global_city_refresh(pplayer);
+    send_player_info(pplayer, pplayer);
     conn_list_do_unbuffer(&pplayer->connections);
   }
 }
@@ -732,10 +732,8 @@
   }
 
   check_player_government_rates(pplayer);
-
-  send_player_info(pplayer, pplayer);
-
   global_city_refresh(pplayer);
+  send_player_info(pplayer, pplayer);
 }
 
 /**************************************************************************
@@ -757,12 +755,10 @@
          get_nation_name_plural(pplayer->nation));
 
   check_player_government_rates(pplayer);
-
+  global_city_refresh(pplayer);
   send_player_info(pplayer, pplayer);
   if (player_owns_active_govchange_wonder(pplayer))
     pplayer->revolution=1;
-
-  global_city_refresh(pplayer);
 }
 
 /**************************************************************************

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