diff -Nur -Xfreeciv-1.12.2-new/diff_ignore -r -u freeciv-1.12.2-old/client/control.c freeciv-1.12.2-new/client/control.c --- freeciv-1.12.2-old/client/control.c Sat Apr 27 08:03:34 2002 +++ freeciv-1.12.2-new/client/control.c Mon May 20 12:53:53 2002 @@ -91,7 +91,7 @@ void auto_center_on_focus_unit(void) { if (punit_focus && - auto_center_on_unit && + auto_center_on_unit && punit_focus->activity!=ACTIVITY_SENTRY && !tile_visible_and_not_on_border_mapcanvas(punit_focus->x, punit_focus->y)) center_tile_mapcanvas(punit_focus->x, punit_focus->y); } @@ -1142,7 +1142,7 @@ refresh_tile_mapcanvas(x, y, was_teleported); if(game.player_idx==punit->owner && punit->activity!=ACTIVITY_GOTO && - auto_center_on_unit && + auto_center_on_unit && punit->activity!=ACTIVITY_SENTRY && !tile_visible_and_not_on_border_mapcanvas(pinfo->x, pinfo->y)) center_tile_mapcanvas(pinfo->x, pinfo->y); diff -Nur -Xfreeciv-1.12.2-new/diff_ignore -r -u freeciv-1.12.2-old/common/unit.c freeciv-1.12.2-new/common/unit.c --- freeciv-1.12.2-old/common/unit.c Fri Apr 5 07:25:38 2002 +++ freeciv-1.12.2-new/common/unit.c Sun May 19 15:17:25 2002 @@ -266,7 +266,8 @@ struct tile *ptile = map_get_tile(x, y); unit_list_iterate(map_get_tile(x, y)->units, punit) { - if (unit_owner(punit) == pplayer) { + if (unit_owner(punit) == pplayer + || pplayers_allied(unit_owner(punit), pplayer)) { if (is_ground_units_transport(punit) && !(is_ground_unit(punit) && ptile->terrain == T_OCEAN)) availability += get_transporter_capacity(punit); diff -Nur -Xfreeciv-1.12.2-new/diff_ignore -r -u freeciv-1.12.2-old/server/unittools.c freeciv-1.12.2-new/server/unittools.c --- freeciv-1.12.2-old/server/unittools.c Sun May 12 18:54:24 2002 +++ freeciv-1.12.2-new/server/unittools.c Mon May 20 13:03:12 2002 @@ -247,7 +247,8 @@ tile_cap = 0; tile_ncargo = 0; unit_list_iterate(map_get_tile(punit->x, punit->y)->units, punit2) { - if (punit2->owner == punit->owner) { + if (punit2->owner == punit->owner + || pplayers_allied(unit_owner(punit2), unit_owner(punit))) { if (is_sailing_unit(punit2) && is_ground_units_transport(punit2)) { tile_cap += get_transporter_capacity(punit2); } else if (is_ground_unit(punit2)) { @@ -1159,12 +1160,6 @@ } - - - - - - /************************************************************************** ... **************************************************************************/ @@ -2514,10 +2509,11 @@ if (is_ground_unit(pcargo) && capacity > 0 && (ptile->terrain == T_OCEAN || pcargo->activity == ACTIVITY_SENTRY) - && pcargo->owner == playerid + && (pcargo->owner == playerid + || pplayers_allied(unit_owner(pcargo), unit_owner(ptrans))) && pcargo->id != ptrans->id - && !(is_ground_unit(ptrans) && (ptile->terrain == T_OCEAN - || is_ground_units_transport(pcargo)))) + && !(is_ground_unit(ptrans) + && (ptile->terrain == T_OCEAN || is_ground_units_transport(pcargo)))) capacity--; else pcargo->transported_by = -1; @@ -2534,7 +2530,8 @@ break; if (is_ground_unit(pcargo) && pcargo->transported_by != ptrans->id - && pcargo->owner == playerid) { + && (pcargo->owner == playerid + || pplayers_allied(unit_owner(pcargo), unit_owner(ptrans)))) { capacity--; pcargo->transported_by = ptrans->id; } @@ -2552,8 +2549,8 @@ && pcargo->activity == ACTIVITY_SENTRY && pcargo->id != ptrans->id && pcargo->owner == playerid - && !(is_ground_unit(ptrans) && (ptile->terrain == T_OCEAN - || is_ground_units_transport(pcargo)))) { + && !(is_ground_unit(ptrans) + && (ptile->terrain == T_OCEAN || is_ground_units_transport(pcargo)))) { bool has_trans = FALSE; unit_list_iterate(ptile->units, ptrans2) { @@ -2584,7 +2581,8 @@ /* Make sure we can transport the units marked as being transported by ptrans */ unit_list_iterate(ptile->units, pcargo) { if (ptrans->id == pcargo->transported_by) { - if (pcargo->owner == playerid + if ((pcargo->owner == playerid + || pplayers_allied(unit_owner(pcargo), unit_owner(ptrans))) && pcargo->id != ptrans->id && (!is_sailing_unit(pcargo)) && (unit_flag(pcargo, F_MISSILE) || !missiles_only) @@ -2608,7 +2606,8 @@ && pcargo->transported_by != ptrans->id && pcargo->activity == ACTIVITY_SENTRY && (unit_flag(pcargo, F_MISSILE) || !missiles_only) - && pcargo->owner == playerid) { + && (pcargo->owner == playerid + || pplayers_allied(unit_owner(pcargo), unit_owner(ptrans)))) { bool has_trans = FALSE; unit_list_iterate(ptile->units, ptrans2) { @@ -2638,7 +2637,8 @@ && pcargo->id != ptrans->id && pcargo->transported_by != ptrans->id && !unit_flag(pcargo, F_MISSILE) - && pcargo->owner == playerid) { + && (pcargo->owner == playerid + || pplayers_allied(unit_owner(pcargo), unit_owner(ptrans)))) { capacity--; pcargo->transported_by = ptrans->id; } @@ -2654,7 +2654,8 @@ && pcargo->id != ptrans->id && pcargo->transported_by != ptrans->id && (!missiles_only || unit_flag(pcargo, F_MISSILE)) - && pcargo->owner == playerid) { + && (pcargo->owner == playerid + || pplayers_allied(unit_owner(pcargo), unit_owner(ptrans)))) { capacity--; pcargo->transported_by = ptrans->id; } @@ -2693,7 +2694,8 @@ && is_ground_unit(pcargo2)) { if (totcap > 0 && (ptile->terrain == T_OCEAN || pcargo2->activity == ACTIVITY_SENTRY) - && pcargo2->owner == playerid + && (pcargo2->owner == playerid + || pplayers_allied(unit_owner(pcargo2), unit_owner(ptrans))) && pcargo2 != ptrans) { pcargo2->transported_by = ptrans->id; totcap--; @@ -2708,7 +2710,8 @@ unit_list_iterate(ptile->units, pcargo2) { if (is_ground_unit(pcargo2) && totcap > 0 - && pcargo2->owner == playerid + && (pcargo2->owner == playerid + || pplayers_allied(unit_owner(pcargo2), unit_owner(ptrans))) && pcargo2->transported_by != ptrans->id) { pcargo2->transported_by = ptrans->id; totcap--; @@ -2957,13 +2960,13 @@ /* Insert them again. */ unit_list_iterate(cargo_units, pcargo) { - unfog_area(pplayer, dest_x, dest_y, unit_type(pcargo)->vision_range); + unfog_area(unit_owner(pcargo), dest_x, dest_y, unit_type(pcargo)->vision_range); pcargo->x = dest_x; pcargo->y = dest_y; unit_list_insert(&pdesttile->units, pcargo); check_unit_activity(pcargo); send_unit_info_to_onlookers(NULL, pcargo, src_x, src_y, TRUE, FALSE); - fog_area(pplayer, src_x, src_y, unit_type(pcargo)->vision_range); + fog_area(unit_owner(pcargo), src_x, src_y, unit_type(pcargo)->vision_range); handle_unit_move_consequences(pcargo, src_x, src_y, dest_x, dest_y); } unit_list_iterate_end; unit_list_unlink_all(&cargo_units);