mirror of https://github.com/OpenTTD/OpenTTD
(svn r6056) -Codechange: don't use a loop what can be done with a simple wrapper
parent
5fd9aeb12b
commit
3cdabcbbac
|
@ -1063,9 +1063,7 @@ bool GenerateTowns(void)
|
||||||
|
|
||||||
// give it a last try, but now more aggressive
|
// give it a last try, but now more aggressive
|
||||||
if (num == 0 && CreateRandomTown(10000, 0) == NULL) {
|
if (num == 0 && CreateRandomTown(10000, 0) == NULL) {
|
||||||
const Town* t;
|
if (GetTownArraySize() > 0) return true;
|
||||||
|
|
||||||
FOR_ALL_TOWNS(t) return true;
|
|
||||||
|
|
||||||
//XXX can we handle that more gracefully?
|
//XXX can we handle that more gracefully?
|
||||||
if (num == 0 && _game_mode != GM_EDITOR) {
|
if (num == 0 && _game_mode != GM_EDITOR) {
|
||||||
|
|
Loading…
Reference in New Issue