Make randomize() use unix time too

(cherry picked from commit 22efa850bd)
This commit is contained in:
kobewi 2021-04-22 17:19:29 +02:00 committed by Rémi Verschelde
parent 6ed82812aa
commit 07fb3c6aca
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -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) {