Author: cazfi
Date: Fri Aug  7 18:32:50 2015
New Revision: 29386

URL: http://svn.gna.org/viewcvs/freeciv?rev=29386&view=rev
Log:
AI handles transported unit directly, if the transport is owned by someone else.

See patch #6181

Modified:
    branches/S2_6/ai/default/aiunit.c

Modified: branches/S2_6/ai/default/aiunit.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/ai/default/aiunit.c?rev=29386&r1=29385&r2=29386&view=diff
==============================================================================
--- branches/S2_6/ai/default/aiunit.c   (original)
+++ branches/S2_6/ai/default/aiunit.c   Fri Aug  7 18:32:50 2015
@@ -2704,7 +2704,8 @@
   dai_set_defenders(ait, pplayer);
 
   unit_list_iterate_safe(pplayer->units, punit) {
-    if (!unit_transported(punit) && !def_ai_unit_data(punit, ait)->done) {
+    if ((!unit_transported(punit) || unit_owner(unit_transport_get(punit)) != 
pplayer)
+         && !def_ai_unit_data(punit, ait)->done) {
       /* Though it is usually the passenger who drives the transport,
        * the transporter is responsible for managing its passengers. */
       dai_manage_unit(ait, pplayer, punit);


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

Reply via email to