summaryrefslogtreecommitdiff
path: root/core/math
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2021-04-22 17:19:29 +0200
committerkobewi <kobewi4e@gmail.com>2021-04-22 21:08:33 +0200
commit22efa850bd8c10c6f8cc0f99664f660b14c92ffc (patch)
treeff6fb5fcbfc67e97e285192dae5e63ee2a822c4d /core/math
parentc7b97f077a0f62d9e280adbddddc901f35e4f40f (diff)
Make randomize() use unix time too
Diffstat (limited to 'core/math')
-rw-r--r--core/math/random_pcg.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/math/random_pcg.cpp b/core/math/random_pcg.cpp
index 9609620469..1152c4e834 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) {