Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2003:
[Freeciv-Dev] Re: (PR#3620) CMA status wrong
Home

[Freeciv-Dev] Re: (PR#3620) CMA status wrong

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: ChrisK@xxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#3620) CMA status wrong
From: "Raimar Falke" <rf13@xxxxxxxxxxxxxxxxx>
Date: Sat, 29 Mar 2003 07:21:14 -0800
Reply-to: rt@xxxxxxxxxxxxxx

> Yes. But checking now with current CVS doesn't show the bug. So I guess it's
> gone ...
> 
> Just in case you want to check yourself with CVS ~ 5 MAR, I attach the
> savegame.

I can reproduce this with the old version and also with the
current. The problem is as follows:

the city changes (because the player moves a ship), server sends new
state, the client updates the cityreport (the X is shown), the CMA is
informed about the change of the city, CMA sees no land and detaches
itself. Since the CMA state is no integral part of the city state, no
updates are done when the CMA state changes. The attached patch fixes
this. I'm not very happy about this fix but I can't think of a better
one.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Life is too short for reboots."

Index: client/agents/cma_core.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/agents/cma_core.c,v
retrieving revision 1.42
diff -u -u -r1.42 cma_core.c
--- client/agents/cma_core.c    2003/02/04 17:07:42     1.42
+++ client/agents/cma_core.c    2003/03/29 15:00:23
@@ -39,6 +39,8 @@
 #include "shared.h"            /* for MIN() */
 #include "support.h"
 #include "timing.h"
+#include "citydlg_g.h"
+#include "cityrep_g.h"
 
 #include "cma_core.h"
 
@@ -704,6 +706,8 @@
 void cma_release_city(struct city *pcity)
 {
   release_city(pcity->id);
+  refresh_city_dialog(pcity);
+  city_report_dialog_update_city(pcity);
 }
 
 /****************************************************************************

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#3620) CMA status wrong, Raimar Falke <=