Author: jtn
Date: Fri Apr 17 18:19:22 2015
New Revision: 28800

URL: http://svn.gna.org/viewcvs/freeciv?rev=28800&view=rev
Log:
Fix/improve comments about how cargo and transporters are knitted
together in the client.

Modified:
    branches/S2_6/client/packhand.c

Modified: branches/S2_6/client/packhand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/packhand.c?rev=28800&r1=28799&r2=28800&view=diff
==============================================================================
--- branches/S2_6/client/packhand.c     (original)
+++ branches/S2_6/client/packhand.c     Fri Apr 17 18:19:22 2015
@@ -1657,7 +1657,9 @@
     repaint_unit = !unit_transported(punit);
     agents_unit_new(punit);
 
-    /* Check if we should link cargo units. */
+    /* Check if we should link cargo units.
+     * (This might be necessary if the cargo info was sent to us before
+     * this transporter.) */
     if (punit->client.occupied) {
       unit_list_iterate(unit_tile(punit)->units, aunit) {
         if (aunit->client.transported_by == punit->id) {
@@ -1682,9 +1684,9 @@
     struct unit *ptrans
       = game_unit_by_number(packet_unit->client.transported_by);
 
-    /* Load unit only if transporter is known by the client. For full
-     * unit info the transporter should be known. See recursive sending
-     * of transporter information in send_unit_info_to_onlookers(). */
+    /* Load unit only if transporter is known by the client.
+     * (If not, cargo will be loaded later when the transporter info is
+     * sent to the client.) */
     if (ptrans && ptrans != unit_transport_get(punit)) {
       /* First, we have to unload the unit from its old transporter. */
       unit_transport_unload(punit);


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to