Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] Re: (PR#2223) cma: server knowledge of island != client kn
Home

[Freeciv-Dev] Re: (PR#2223) cma: server knowledge of island != client kn

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: nightmare@xxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2223) cma: server knowledge of island != client knowledge
From: "Raimar Falke via RT" <rt@xxxxxxxxxxxxxx>
Date: Wed, 12 Feb 2003 07:40:01 -0800
Reply-to: rt.freeciv.org@xxxxxxxxxxxxxx

On Thu, Jan 09, 2003 at 09:49:25AM -0800, Raimar Falke via RT wrote:
> Only if you add a continent to city_info or tile_info that also the
> client(s) get informed.

This has been applied. However this is still an open issue. While the
client has knowledge about the city it doesn't have knowledge about
the tile underneath. Fix attached.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Make it idiot-proof and someone will make a better idiot."

Index: server/citytools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/citytools.c,v
retrieving revision 1.209
diff -u -u -r1.209 citytools.c
--- server/citytools.c  2003/02/10 21:43:42     1.209
+++ server/citytools.c  2003/02/12 15:32:54
@@ -1583,17 +1583,22 @@
        package_city(pcity, &packet, FALSE);   /* should be dumb_city info? */
        lsend_packet_city_info(dest, &packet);
       }
-    } else if (map_get_known_and_seen(x, y, pviewer)) {
-      if (pcity) { /* it's there and we see it; update and send */
-       update_dumb_city(pviewer, pcity);
-       package_dumb_city(pviewer, x, y, &sc_pack);
-       lsend_packet_short_city(dest, &sc_pack);
+    } else {
+      if (!map_get_known(x, y, pviewer)) {
+       show_area(pviewer, x, y, 0);
       }
-    } else { /* not seen; send old info */
-      pdcity = map_get_player_tile(x, y, pviewer)->city;
-      if (pdcity) {
-       package_dumb_city(pviewer, x, y, &sc_pack);
-       lsend_packet_short_city(dest, &sc_pack);
+      if (map_get_known_and_seen(x, y, pviewer)) {
+       if (pcity) {            /* it's there and we see it; update and send */
+         update_dumb_city(pviewer, pcity);
+         package_dumb_city(pviewer, x, y, &sc_pack);
+         lsend_packet_short_city(dest, &sc_pack);
+       }
+      } else {                 /* not seen; send old info */
+       pdcity = map_get_player_tile(x, y, pviewer)->city;
+       if (pdcity) {
+         package_dumb_city(pviewer, x, y, &sc_pack);
+         lsend_packet_short_city(dest, &sc_pack);
+       }
       }
     }
   }

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#2223) cma: server knowledge of island != client knowledge, Raimar Falke via RT <=