forked from mirror/OpenTTD
Fix #11164: Duplicate town names when using the many random towns function
This commit is contained in:
committed by
rubidium42
parent
4213a2c909
commit
6a048bc168
@@ -2256,6 +2256,11 @@ bool GenerateTowns(TownLayout layout)
|
|||||||
|
|
||||||
SetGeneratingWorldProgress(GWP_TOWN, total);
|
SetGeneratingWorldProgress(GWP_TOWN, total);
|
||||||
|
|
||||||
|
/* Pre-populate the town names list with the names of any towns already on the map */
|
||||||
|
for (const Town *town : Town::Iterate()) {
|
||||||
|
town_names.insert(town->GetCachedName());
|
||||||
|
}
|
||||||
|
|
||||||
/* First attempt will be made at creating the suggested number of towns.
|
/* First attempt will be made at creating the suggested number of towns.
|
||||||
* Note that this is really a suggested value, not a required one.
|
* Note that this is really a suggested value, not a required one.
|
||||||
* We would not like the system to lock up just because the user wanted 100 cities on a 64*64 map, would we? */
|
* We would not like the system to lock up just because the user wanted 100 cities on a 64*64 map, would we? */
|
||||||
|
Reference in New Issue
Block a user