Author: cazfi Date: Wed Aug 10 11:10:02 2016 New Revision: 33537 URL: http://svn.gna.org/viewcvs/freeciv?rev=33537&view=rev Log: Remove drowning units from the clients even if they didn't see those units when they still had not jumped out of the sinking transport.
Reported by Christian Knoke <chrisk> See bug #24921 Modified: branches/S2_6/server/unittools.c Modified: branches/S2_6/server/unittools.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/unittools.c?rev=33537&r1=33536&r2=33537&view=diff ============================================================================== --- branches/S2_6/server/unittools.c (original) +++ branches/S2_6/server/unittools.c Wed Aug 10 11:10:02 2016 @@ -1707,7 +1707,15 @@ _("%s lost when %s was lost."), unit_tile_link(pcargo), utype_name_translation(ptransport)); - wipe_unit_full(pcargo, TRUE, ULR_TRANSPORT_LOST, killer); + /* Unit is not transported any more at this point, but it has jumped + * off the transport and drowns outside. So it must be removed from + * all clients. + * However, we don't know if given client has received ANY updates + * about the swimming unit, and we can't remove it if it's not there + * in the first place -> we send it once here just to be sure it's + * there. */ + send_unit_info(NULL, pcargo); + wipe_unit_full(pcargo, FALSE, ULR_TRANSPORT_LOST, killer); } /**************************************************************************** @@ -1754,7 +1762,11 @@ } /* Could use unit_transport_unload_send here, but that would - * call send_unit_info for the transporter unnecessarily. */ + * call send_unit_info for the transporter unnecessarily. + * Note that this means that unit might to get seen briefly + * by clients other than owner's, for example as a result of + * update of homecity common to this cargo and some other + * destroyed unit. */ unit_transport_unload(pcargo); if (pcargo->activity == ACTIVITY_SENTRY) { /* Activate sentried units - like planes on a disbanded carrier. _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits