OpenTTD
Functions | Variables
random_func.cpp File Reference

Implementation of the pseudo random generator. More...

#include "../stdafx.h"
#include "random_func.hpp"
#include "bitmath_func.hpp"
#include "../safeguards.h"

Go to the source code of this file.

Functions

void SetRandomSeed (uint32 seed)
 (Re)set the state of the random number generators. More...
 

Variables

Randomizer _random
 Random used in the game state calculations.
 
Randomizer _interactive_random
 Random used every else where is does not (directly) influence the game state.
 

Detailed Description

Implementation of the pseudo random generator.

Definition in file random_func.cpp.

Function Documentation

◆ SetRandomSeed()

void SetRandomSeed ( uint32  seed)

(Re)set the state of the random number generators.

Parameters
seedthe new state

Definition at line 67 of file random_func.cpp.

References _network_server, _networking, and Randomizer::SetSeed().

Referenced by RestoreRandomSeeds().