Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] Re: (PR#7131) client orders to replace client goto
Home

[Freeciv-Dev] Re: (PR#7131) client orders to replace client goto

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7131) client orders to replace client goto
From: "Arnstein Lindgard" <a-l@xxxxxxx>
Date: Thu, 8 Jan 2004 08:03:08 -0800
Reply-to: rt@xxxxxxxxxxx

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

Unit pix label update bug. (Patch attached).

Also, server/unithand.c:handle_unit_goto() needs to set orders so
client can display the "G" sprite.


Arnstein


--- 7/client/control.c  Thu Jan  8 08:53:55 2004
+++ bug-7/client/control.c      Thu Jan  8 16:20:30 2004
@@ -396,6 +396,7 @@
 void update_unit_pix_label(struct unit *punit)
 {
   static enum unit_activity prev_activity = ACTIVITY_UNKNOWN;
+  static bool prev_orders = FALSE;
   static Unit_Type_id prev_unit_type = U_LAST;
   static int prev_hp = -1;              /* or could store ihp cf tilespec.c */
   
@@ -404,10 +405,12 @@
   if (punit && get_client_state() != CLIENT_GAME_OVER_STATE) {
     if (punit->type != prev_unit_type
        || punit->activity != prev_activity
+       || punit->has_orders != prev_orders
        || punit->hp != prev_hp) {
       set_unit_icon(-1, punit);
       prev_unit_type = punit->type;
       prev_activity = punit->activity;
+      prev_orders = punit->has_orders;
       prev_hp = punit->hp;
     }
 
@@ -434,6 +437,7 @@
   else {
     prev_unit_type = U_LAST;
     prev_activity = ACTIVITY_UNKNOWN;
+    prev_orders = FALSE;
     prev_hp = -1;
     for(i=-1; i<num_units_below; i++) {
       set_unit_icon(i, NULL);


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