Index: common/aicore/citymap.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/aicore/citymap.c,v retrieving revision 1.1 diff -u -r1.1 citymap.c --- common/aicore/citymap.c 24 May 2004 21:42:16 -0000 1.1 +++ common/aicore/citymap.c 14 Jun 2004 21:55:17 -0000 @@ -61,7 +61,7 @@ players_iterate(pplayer) { city_list_iterate(pplayer->cities, pcity) { map_city_radius_iterate(pcity->x, pcity->y, x1, y1) { - struct tile *ptile = map_get_tile(pcity->x, pcity->y); + struct tile *ptile = map_get_tile(x1, y1); if (ptile->worked) { citymap[x1][y1] = -(ptile->worked->id); @@ -162,3 +162,17 @@ } } map_city_radius_iterate_end; } + +/************************************************************************** + Reserve additional tiles as desired (eg I would reserve best available + food tile in addition to adjacent tiles) +**************************************************************************/ +void citymap_reserve_tile(int x, int y, int id) +{ +#ifdef DEBUG + assert(is_normal_map_pos(x, y)); + assert(!citymap_is_reserved(x,y)); +#endif + + citymap[x][y] = -id; +} Index: common/aicore/citymap.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/aicore/citymap.h,v retrieving revision 1.1 diff -u -r1.1 citymap.h --- common/aicore/citymap.h 24 May 2004 21:42:16 -0000 1.1 +++ common/aicore/citymap.h 14 Jun 2004 21:55:21 -0000 @@ -18,5 +18,6 @@ bool citymap_is_reserved(int x, int y); void citymap_reserve_city_spot(int x, int y, int id); void citymap_free_city_spot(int x, int y, int id); +void citymap_reserve_tile(int x, int y, int id); #endif