mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 18:40:29 +00:00
(svn r21192) -Fix (r15505)[FS#4226]: Use non-interactive randomness for townnames on map generation, so they are controlled by the generation-seed as well.
This commit is contained in:
parent
1fe2ce42ca
commit
478da38d2b
@ -16,6 +16,7 @@
|
|||||||
#include "core/alloc_func.hpp"
|
#include "core/alloc_func.hpp"
|
||||||
#include "strings_func.h"
|
#include "strings_func.h"
|
||||||
#include "core/random_func.hpp"
|
#include "core/random_func.hpp"
|
||||||
|
#include "genworld.h"
|
||||||
|
|
||||||
#include "table/townname.h"
|
#include "table/townname.h"
|
||||||
|
|
||||||
@ -118,7 +119,7 @@ bool GenerateTownName(uint32 *townnameparts)
|
|||||||
TownNameParams par(_settings_game.game_creation.town_name);
|
TownNameParams par(_settings_game.game_creation.town_name);
|
||||||
|
|
||||||
for (int i = 1000; i != 0; i--) {
|
for (int i = 1000; i != 0; i--) {
|
||||||
uint32 r = InteractiveRandom();
|
uint32 r = _generating_world ? Random() : InteractiveRandom();
|
||||||
if (!VerifyTownName(r, &par)) continue;
|
if (!VerifyTownName(r, &par)) continue;
|
||||||
|
|
||||||
*townnameparts = r;
|
*townnameparts = r;
|
||||||
|
Loading…
Reference in New Issue
Block a user