mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 10:59:20 +02:00
seed the random engines from the system pool, not std::random_device
This commit is contained in:
@@ -403,10 +403,9 @@ std::string *brush_object_list::GetRandomObject()
|
||||
if (Objects.empty())
|
||||
return ∅
|
||||
|
||||
static std::mt19937 rng{std::random_device{}()};
|
||||
std::uniform_int_distribution<size_t> dist(0, Objects.size() - 1);
|
||||
|
||||
return &Objects[dist(rng)];
|
||||
return &Objects[dist(Global.local_random_engine)];
|
||||
}
|
||||
|
||||
void brush_object_list::render()
|
||||
|
||||
Reference in New Issue
Block a user