aboutsummaryrefslogtreecommitdiff
path: root/core/math/math_funcs.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2014-02-15 02:01:39 -0300
committerJuan Linietsky2014-02-15 02:02:41 -0300
commit9afdb3e0ad5bfbdafe307212f5d4ebcc7c3ac852 (patch)
treed25ef63dfe50d59987b4a611c1d1773185a3e35d /core/math/math_funcs.cpp
parentb0870e487c6cc68bb0a2cef7174f3f5697667a2e (diff)
downloadgodot-9afdb3e0ad5bfbdafe307212f5d4ebcc7c3ac852.tar.gz
godot-9afdb3e0ad5bfbdafe307212f5d4ebcc7c3ac852.tar.zst
godot-9afdb3e0ad5bfbdafe307212f5d4ebcc7c3ac852.zip
Diffstat (limited to 'core/math/math_funcs.cpp')
-rw-r--r--core/math/math_funcs.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/math/math_funcs.cpp b/core/math/math_funcs.cpp
index 2ba36e5a4..5d3887d72 100644
--- a/core/math/math_funcs.cpp
+++ b/core/math/math_funcs.cpp
@@ -75,7 +75,8 @@ void Math::seed(uint32_t x) {
void Math::randomize() {
- seed(OS::get_singleton()->get_ticks_usec()); /* *OS::get_singleton()->get_time().sec); // windows doesn't have get_time(), returns always 0 */
+ OS::Time time = OS::get_singleton()->get_time();
+ seed(OS::get_singleton()->get_ticks_usec()*time.hour*time.min*time.sec*rand()); /* *OS::get_singleton()->get_time().sec); // windows doesn't have get_time(), returns always 0 */
}
uint32_t Math::rand() {