[Freeciv-Dev] (PR#10929) Units report is not updated
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10929 >
> [stepan@xxxxxxxx - Sun Nov 07 13:02:33 2004]:
>
> Freeciv 2.0.0-beta3, client gtk2.
>
> When unit is lost, the Units report is not updated till next turn.
This patch should fix it. Please test.
jason
? a.out
? foo.c
? freeciv-2.0.0-beta3.tar.gz
Index: client/packhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v
retrieving revision 1.408.2.6
diff -u -r1.408.2.6 packhand.c
--- client/packhand.c 4 Nov 2004 20:57:49 -0000 1.408.2.6
+++ client/packhand.c 8 Nov 2004 18:18:02 -0000
@@ -232,13 +232,20 @@
void handle_unit_remove(int unit_id)
{
struct unit *punit = find_unit_by_id(unit_id);
+ struct player *powner;
if (!punit) {
return;
}
+ powner = unit_owner(punit);
+
agents_unit_remove(punit);
client_remove_unit(punit);
+
+ if (powner == game.player_ptr) {
+ activeunits_report_dialog_update();
+ }
}
/**************************************************************************
|
|