Author: cazfi Date: Wed Aug 10 11:09:55 2016 New Revision: 33536 URL: http://svn.gna.org/viewcvs/freeciv?rev=33536&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: trunk/server/unittools.c Modified: trunk/server/unittools.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/unittools.c?rev=33536&r1=33535&r2=33536&view=diff ============================================================================== --- trunk/server/unittools.c (original) +++ trunk/server/unittools.c Wed Aug 10 11:09:55 2016 @@ -1751,7 +1751,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); } /**************************************************************************** @@ -1798,7 +1806,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