Classes | |
class | rng |
this class does not give synced random results derived classes might do. More... | |
class | rng_deterministic |
This rng is used when the normal synced rng is not available this is currently only he case at the very start of the scenario (random generation of starting units traits). More... | |
class | set_random_determinstic |
RAII class to use rng_deterministic in the current scope. More... | |
class | synced_rng |
Variables | |
rng * | generator = &rng::default_instance() |
This generator is automatically synced during synced context. More... | |
rng * random_new::generator = &rng::default_instance() |
This generator is automatically synced during synced context.
Calling this rng during a synced context automatically makes undoing impossible. Outside a synced context this has the same effect as rand()
Definition at line 52 of file random_new.cpp.
Referenced by synced_context::can_undo(), context_free_grammar_generator::generate(), generate_gender(), unit::generate_traits(), game_state::init(), game_lua_kernel::intf_random(), leave_synced_context::leave_synced_context(), lua_kernel_base::lua_kernel_base(), markov_generate_name(), random_generate_map(), random_generate_scenario(), random_new::set_random_determinstic::set_random_determinstic(), set_scontext_synced_base::set_scontext_synced_base(), leave_synced_context::~leave_synced_context(), random_new::set_random_determinstic::~set_random_determinstic(), and set_scontext_synced_base::~set_scontext_synced_base().