From a871114339a42ce62c8a126b847cd3adcb9603ba Mon Sep 17 00:00:00 2001 From: Anutrix Date: Sat, 8 Oct 2022 05:05:15 +0530 Subject: Randomize RandomNumberGenerator instances' default seed --- core/math/random_number_generator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/math') diff --git a/core/math/random_number_generator.h b/core/math/random_number_generator.h index 9352bae0a6..bf67154cd6 100644 --- a/core/math/random_number_generator.h +++ b/core/math/random_number_generator.h @@ -57,7 +57,7 @@ public: _FORCE_INLINE_ real_t randfn(real_t p_mean = 0.0, real_t p_deviation = 1.0) { return randbase.randfn(p_mean, p_deviation); } _FORCE_INLINE_ int randi_range(int p_from, int p_to) { return randbase.random(p_from, p_to); } - RandomNumberGenerator() {} + RandomNumberGenerator() { randbase.randomize(); } }; #endif // RANDOM_NUMBER_GENERATOR_H -- cgit v1.2.3