MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / SetSeed

Method SetSeed

src/core/random_func.cpp:55–59  ·  view source on GitHub ↗

* (Re)set the state of the random number generator. * @param seed the new state */

Source from the content-addressed store, hash-verified

53 * @param seed the new state
54 */
55void Randomizer::SetSeed(uint32_t seed)
56{
57 this->state[0] = seed;
58 this->state[1] = seed;
59}
60
61/**
62 * (Re)set the state of the random number generators.

Callers 4

CmdBuildIndustryFunction · 0.80
_GenerateWorldFunction · 0.80
InitializeRandomizersMethod · 0.80
SetRandomSeedFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected