Author: pepeto Date: Mon Nov 10 10:34:14 2014 New Revision: 27021 URL: http://svn.gna.org/viewcvs/freeciv?rev=27021&view=rev Log: Fair island map generator: use CITY_MAP_DEFAULT_RADIUS and CITY_MAP_DEFAULT_RADIUS_SQ for determining the amount of sea tiles around the island with start positions.
See gna patch #5409 Modified: branches/S2_5/server/generator/mapgen.c Modified: branches/S2_5/server/generator/mapgen.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/generator/mapgen.c?rev=27021&r1=27020&r2=27021&view=diff ============================================================================== --- branches/S2_5/server/generator/mapgen.c (original) +++ branches/S2_5/server/generator/mapgen.c Mon Nov 10 10:34:14 2014 @@ -3157,7 +3157,10 @@ struct fair_tile *land_tiles[1000]; struct fair_tile *pftile, *pftile2, *pftile3; int fantasy; - int sea_around_island = (startpos_num > 0 ? 2 : 1); + const int sea_around_island = (startpos_num > 0 + ? CITY_MAP_DEFAULT_RADIUS : 1); + const int sea_around_island_sq = (startpos_num > 0 + ? CITY_MAP_DEFAULT_RADIUS_SQ : 2); int i, j, k; size = CLIP(startpos_num, size, ARRAY_SIZE(land_tiles)); @@ -3246,8 +3249,8 @@ /* Make sea arround the island. */ for (i = 0; i < size; i++) { - square_iterate(index_to_tile(land_tiles[i] - pisland), sea_around_island, - ptile) { + circle_iterate(index_to_tile(land_tiles[i] - pisland), + sea_around_island_sq, ptile) { pftile = pisland + tile_index(ptile); if (pftile->flags == FTF_NONE) { @@ -3259,7 +3262,7 @@ pftile->flags |= FTF_ASSIGNED; } } - } square_iterate_end; + } circle_iterate_end; } /* Make rivers. */ _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits