<URL: http://bugs.freeciv.org/Ticket/Display.html?id=15712 >
2008/5/16 Marko Lindqvist: > > Reason for this one was unit losing visibility of itself when > transferred from old player to new rebel player. Sending of > remove_unit to client before fogging was optimized out on the basis > that player will get later info about lost unit anyway (which was not > even true in this case). S2_0 version attached. - ML
diff -Nurd -X.diff_ignore freeciv/server/unittools.c freeciv/server/unittools.c --- freeciv/server/unittools.c 2007-09-14 17:27:46.000000000 +0300 +++ freeciv/server/unittools.c 2008-05-16 05:40:40.000000000 +0300 @@ -1929,11 +1929,12 @@ **************************************************************************/ void unit_goes_out_of_sight(struct player *pplayer, struct unit *punit) { - struct packet_unit_short_info packet; - if (unit_owner(punit) == pplayer) { - /* The unit is about to die. No need to send an info. */ + /* Unit is either about to die, or to change owner (civil war, bribe) */ + dlsend_packet_unit_remove(&pplayer->connections, punit->id); } else { + struct packet_unit_short_info packet; + memset(&packet, 0, sizeof(packet)); packet.id = punit->id; packet.goes_out_of_sight = TRUE;
_______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev