[Freeciv-Dev] (PR#15261) Observer ghost cities
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<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);
|
|