From 22efa850bd8c10c6f8cc0f99664f660b14c92ffc Mon Sep 17 00:00:00 2001 From: kobewi Date: Thu, 22 Apr 2021 17:19:29 +0200 Subject: [PATCH] Make randomize() use unix time too --- core/math/random_pcg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/math/random_pcg.cpp b/core/math/random_pcg.cpp index 960962046929..1152c4e834b1 100644 --- a/core/math/random_pcg.cpp +++ b/core/math/random_pcg.cpp @@ -39,7 +39,7 @@ RandomPCG::RandomPCG(uint64_t p_seed, uint64_t p_inc) : } void RandomPCG::randomize() { - seed(OS::get_singleton()->get_ticks_usec() * pcg.state + PCG_DEFAULT_INC_64); + seed((OS::get_singleton()->get_unix_time() + OS::get_singleton()->get_ticks_usec()) * pcg.state + PCG_DEFAULT_INC_64); } double RandomPCG::random(double p_from, double p_to) {