Index: server/unitfunc.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/unitfunc.c,v retrieving revision 1.176 diff -u -r1.176 unitfunc.c --- unitfunc.c 2000/06/13 13:54:59 1.176 +++ unitfunc.c 2000/06/13 16:43:03 @@ -3059,6 +3059,28 @@ int capacity = get_transporter_capacity(ptrans); struct tile *ptile = map_get_tile(x, y); + /*** FIXME: We kludge AI compatability problems with the new code away here ***/ + if (is_sailing_unit(ptrans) + && is_ground_units_transport(ptrans) + && unit_owner(ptrans)->ai.control) { + unit_list_iterate(ptile->units, pcargo) { + if (pcargo->owner == playerid) { + pcargo->transported_by = -1; + } + } unit_list_iterate_end; + + unit_list_iterate(ptile->units, pcargo) { + if ((ptile->terrain == T_OCEAN || pcargo->activity == ACTIVITY_SENTRY) + && capacity > 0 + && is_ground_unit(pcargo) + && pcargo->owner == playerid) { + pcargo->transported_by = ptrans->id; + capacity--; + } + } unit_list_iterate_end; + return; + } + /*** Ground units transports first ***/ if (is_ground_units_transport(ptrans)) { int available = ground_unit_transporter_capacity(x, y, playerid); Index: server/unithand.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/unithand.c,v retrieving revision 1.141 diff -u -r1.141 unithand.c --- unithand.c 2000/06/09 13:26:17 1.141 +++ unithand.c 2000/06/13 16:43:11 @@ -1004,7 +1004,7 @@ int src_y = punit->y; int move_cost = map_move_cost(punit, dest_x, dest_y); /* The ai should assign the relevant units itself, but for now leave this */ - int take_from_land = punit->activity == ACTIVITY_IDLE || pplayer->ai.control; + int take_from_land = punit->activity == ACTIVITY_IDLE; int survived; survived = move_unit(punit, dest_x, dest_y, 1, take_from_land, move_cost);