Fix RNG seed initialization (#1383)
This commit is contained in:
parent
7c459805f6
commit
cf42baa43b
@ -427,7 +427,7 @@ void script_terminate_handler()
|
|||||||
void CommandHandler::setupContext(Context *ctx)
|
void CommandHandler::setupContext(Context *ctx)
|
||||||
{
|
{
|
||||||
if (ctx->settings.find(ctx->id("seed")) != ctx->settings.end())
|
if (ctx->settings.find(ctx->id("seed")) != ctx->settings.end())
|
||||||
ctx->rngstate = ctx->setting<uint64_t>("seed");
|
ctx->rngseed(ctx->setting<uint64_t>("seed"));
|
||||||
|
|
||||||
if (vm.count("verbose")) {
|
if (vm.count("verbose")) {
|
||||||
ctx->verbose = true;
|
ctx->verbose = true;
|
||||||
@ -447,7 +447,7 @@ void CommandHandler::setupContext(Context *ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (vm.count("seed")) {
|
if (vm.count("seed")) {
|
||||||
ctx->rngstate = vm["seed"].as<uint64_t>();
|
ctx->rngseed(vm["seed"].as<uint64_t>());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vm.count("threads")) {
|
if (vm.count("threads")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user