diff -Nur -X/home/thue/freeciv-dev/no.freeciv freeciv/server/citytools.c transfer_bug/server/citytools.c --- freeciv/server/citytools.c Sat Apr 8 14:29:46 2000 +++ transfer_bug/server/citytools.c Sat Apr 8 14:39:32 2000 @@ -583,20 +583,15 @@ * supported by the city, but held in other cities are updated to * reflect those cities as their new homecity. Units supported * by the bought city, that are not in a city square may be deleted. - * This depends on the value of kill_outside. Just in case the - * supported units are in an unexplored part of the map, the - * area around them is lightened. + * This depends on the value of kill_outside. If the units are in + * an unexplored square the area is automatically reveiled when the + * unit if created. * * - Kris Bubendorfer * * If verbose is true, send extra messages to players detailing what * happens to all the units. --dwp * - * "if" statement added to see if the owner of pcity is the same as vcity. If so, - * then the city is disbanded and not bought, and we only need to evaluate the - * units supported by the city, and not those actually present. - * - Thue - * * Interpretation of kill_outside changed to mean the radius outside * of which supported units are killed. If 0, all supported units not * in the city are killed. If -1, no supported units are killed. --jjm @@ -608,21 +603,22 @@ int x = vcity->x; int y = vcity->y; - if (city_owner(pcity)!=city_owner(vcity)) { /* true=>bought, false =>disbanded */ - /* Transfer units in the city to the new owner */ - unit_list_iterate(map_get_tile(x, y)->units, vunit) { - freelog(LOG_VERBOSE, "Transfered %s in %s from %s to %s", - unit_name(vunit->type), vcity->name, pvictim->name, pplayer->name); - if (verbose) { - notify_player(pvictim, _("Game: Transfered %s in %s from %s to %s."), - unit_name(vunit->type), vcity->name, - pvictim->name, pplayer->name); - } + /* Transfer units in the city to the new owner */ + unit_list_iterate(map_get_tile(x, y)->units, vunit) { + freelog(LOG_VERBOSE, "Transfered %s in %s from %s to %s", + unit_name(vunit->type), vcity->name, pvictim->name, pplayer->name); + if (verbose) { + notify_player(pvictim, _("Game: Transfered %s in %s from %s to %s."), + unit_name(vunit->type), vcity->name, + pvictim->name, pplayer->name); + } + /* 000608 wegge Dont transfer units already owned by new city-owner */ + if (vunit->owner != pplayer->player_no) { create_unit_full(pplayer, x, y, vunit->type, vunit->veteran, pcity->id, vunit->moves_left, vunit->hp); wipe_unit(0, vunit); - } unit_list_iterate_end; - } + } + } unit_list_iterate_end; /* Any remaining units supported by the city are either given new home * cities or maybe destroyed */