1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2025-12-10 06:52:05 +01:00

Fix: always try to create at least one town

This commit is contained in:
Rubidium
2025-12-06 11:59:49 +01:00
committed by rubidium42
parent 6e65b2387a
commit 064f4df6cc

View File

@@ -2448,7 +2448,7 @@ bool GenerateTowns(TownLayout layout, std::optional<uint> number)
total = Map::ScaleByLandProportion(GetDefaultTownsForMapSize() + (Random() & 7)); total = Map::ScaleByLandProportion(GetDefaultTownsForMapSize() + (Random() & 7));
} }
total = std::min<uint>(TownPool::MAX_SIZE, total); total = Clamp<uint>(total, 1, TownPool::MAX_SIZE);
uint32_t townnameparts; uint32_t townnameparts;
TownNames town_names; TownNames town_names;