diff -Nur -X/home/thue/freeciv-dev/no.freeciv freeciv/server/unittools.c resolve_yet_again/server/unittools.c --- freeciv/server/unittools.c Tue Apr 25 19:35:34 2000 +++ resolve_yet_again/server/unittools.c Wed Apr 26 02:22:10 2000 @@ -762,13 +762,25 @@ punit = unit_list_get(&map_get_tile(x, y)->units, 0); if (!punit) return; + pcity = find_closest_owned_city(get_player(punit->owner), x, y, + is_sailing_unit(punit), NULL); + + /* If punit is in an enemy city we send it to the closest friendly city + This is not always caught by the other checks which require that + there units from two nations on the tile */ + ccity = map_get_city(x,y); + if (ccity && ccity->owner != punit->owner) { + if (pcity) + teleport_unit_to_city(punit, pcity, 0, verbose); + else + disband_stack_conflict_unit(punit, verbose); + continue; + } cunit = is_enemy_unit_on_tile(x, y, punit->owner); if (!cunit) break; - pcity = find_closest_owned_city(get_player(punit->owner), x, y, - is_sailing_unit(punit), NULL); ccity = find_closest_owned_city(get_player(cunit->owner), x, y, is_sailing_unit(cunit), NULL);