diff common/player.c common/player.c --- common/player.c Sat Dec 30 16:17:06 2000 +++ common/player.c Sat Jan 13 16:46:47 2001 @@ -176,13 +176,14 @@ /* Search for units/cities that might be able to see the sub/missile */ int x, y; struct city *pcity; - struct unit *punit2; for(y=punit->y-1; y<=punit->y+1; ++y) { if(y<0 || y>=map.ysize) continue; for(x=punit->x-1; x<=punit->x+1; ++x) { - if((punit2=unit_list_get(&map_get_tile(x, y)->units, 0)) && - punit2->owner == pplayer->player_no ) return 1; + unit_list_iterate(map_get_tile(x, y)->units, punit2) { + if (punit2->owner == pplayer->player_no) + return 1; + } unit_list_iterate_end; if((pcity=map_get_city(x, y)) && pcity->owner==pplayer->player_no) return 1;