diff server/cityturn.c server/cityturn.c --- server/cityturn.c Mon Jul 31 20:08:13 2000 +++ server/cityturn.c Mon Jul 31 20:22:01 2000 @@ -415,17 +415,23 @@ **************************************************************************/ int unit_being_aggressive(struct unit *punit) { + int n; + if (get_unit_type(punit->type)->attack_strength==0) return 0; if (map_get_city(punit->x,punit->y)) return 0; if (is_ground_unit(punit) && map_get_special(punit->x,punit->y)&S_FORTRESS) { - city_list_iterate(get_player(punit->owner)->cities, pcity) { - if (real_map_distance(punit->x, punit->y, pcity->x, pcity->y)<=3) - return 0; + for(n=0; n < game.nplayers; n++) { + if (players_allied(punit->owner,n)) { + city_list_iterate(game.players[n].cities, pcity) { + if (real_map_distance(punit->x, punit->y, pcity->x, pcity->y)<=3) + return 0; + } + city_list_iterate_end; + } } - city_list_iterate_end; } return 1; }