Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2006:
[Freeciv-Dev] (PR#15261) Observer ghost cities
Home

[Freeciv-Dev] (PR#15261) Observer ghost cities

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: himasaram@xxxxxxxx
Subject: [Freeciv-Dev] (PR#15261) Observer ghost cities
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 9 Mar 2006 22:10:57 -0800
Reply-to: bugs@xxxxxxxxxxx

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

> [dmarks - Tue Jan 24 09:05:46 2006]:
> 
> Running latest S2_1: Destroyed cities doesn't get removed from the map
> for observers. Observed several times.

This patch should fix it.  Please test.

-jason


Index: server/citytools.c
===================================================================
--- server/citytools.c  (revision 11743)
+++ server/citytools.c  (working copy)
@@ -1141,6 +1141,14 @@
       reality_check_city(other_player, ptile);
     }
   } players_iterate_end;
+  conn_list_iterate(game.est_connections, pconn) {
+    if (!pconn->player && pconn->observer) {
+      /* For detached observers we have to send a specific packet.  This is
+       * a hack necessitated by the private map that exists for players but
+       * not observers. */
+      dsend_packet_city_remove(pconn, pcity->id);
+    }
+  } conn_list_iterate_end;
 
   vision_clear_sight(old_vision);
   vision_free(old_vision);

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