Author: jtn Date: Mon Jan 25 19:34:34 2016 New Revision: 31599 URL: http://svn.gna.org/viewcvs/freeciv?rev=31599&view=rev Log: Update map retry after bug #24319 introduced seed_setting. A failing player-specified mapseed is no longer pointlessly retried.
See gna bug #24341. Modified: branches/S2_6/server/srv_main.c Modified: branches/S2_6/server/srv_main.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/srv_main.c?rev=31599&r1=31598&r2=31599&view=diff ============================================================================== --- branches/S2_6/server/srv_main.c (original) +++ branches/S2_6/server/srv_main.c Mon Jan 25 19:34:34 2016 @@ -2876,7 +2876,9 @@ { "teamplacement", } }; int i; - bool retry_ok = (game.map.server.seed == 0 + /* If a specific seed has been requested, there's no point retrying, + * as the map will be the same every time. */ + bool retry_ok = (game.map.server.seed_setting == 0 && game.map.server.generator != MAPGEN_SCENARIO); int max = retry_ok ? 3 : 1; bool created = FALSE; @@ -2911,6 +2913,9 @@ if (!created && max > 1) { int set; + /* If we're retrying, seed_setting==0, which will yield a new map + * next time */ + fc_assert(game.map.server.seed_setting == 0); if (i == 0) { /* We will retry only if max attempts allow it */ log_normal(_("Failed to create suitable map, retrying with another mapseed.")); @@ -2921,8 +2926,6 @@ * +2 */ log_normal(_("Attempt %d/%d"), i + 2, max); } - /* Reset mapseed so generator knows to use new one */ - game.map.server.seed = 0; /* One should never set this to false in scenario map that had resources * placed. We are safe side here as map generation is retried only if this is * not scenario map at all. */ _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits