Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2005:
[Freeciv-Dev] (PR#13691) another unit icon loaded state bug
Home

[Freeciv-Dev] (PR#13691) another unit icon loaded state bug

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: chrisk@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#13691) another unit icon loaded state bug
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 20 Aug 2005 00:17:47 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13691 >

> [chrisk - Tue Aug 16 23:02:43 2005]:
> 
> 
> S2.0 CVS 16 AUG 2005 GTK2
> 
> An explorer loaded on a trireme, inside a city, keeps its loaded state 'L'
> when I disband the trireme.

Indeed.  This patch fixes it.

-jason

Index: server/unittools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unittools.c,v
retrieving revision 1.375
diff -p -u -r1.375 unittools.c
--- server/unittools.c  13 Aug 2005 05:27:24 -0000      1.375
+++ server/unittools.c  20 Aug 2005 07:14:21 -0000
@@ -1514,6 +1514,8 @@ void wipe_unit_spec_safe(struct unit *pu
      * will be sent eventually anyway, but it's surely a bug. */
     unit_list_iterate(ptile->units, pcargo) {
       if (pcargo->transported_by == punit->id) {
+       /* Could use unload_unit_from_transporter here, but that would
+        * call send_unit_info for the transporter unnecessarily. */
        pull_unit_from_transporter(pcargo, punit);
        if (pcargo->activity == ACTIVITY_SENTRY) {
          /* Activate sentried units - like planes on a disbanded carrier.
@@ -1521,6 +1523,7 @@ void wipe_unit_spec_safe(struct unit *pu
           * transporter. */
          set_unit_activity(pcargo, ACTIVITY_IDLE);
        }
+       send_unit_info(NULL, pcargo);
       } 
     } unit_list_iterate_end;
   }

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