Merge pull request #43330 from KoBeWi/rngesus

Call randomize() automatically
This commit is contained in:
Rémi Verschelde 2021-04-23 10:17:11 +02:00 committed by GitHub
commit 492b8aa9a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -804,10 +804,7 @@
<method name="randomize">
<description>
Randomizes the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time.
[codeblock]
func _ready():
randomize()
[/codeblock]
[b]Note:[/b] This method is called automatically when the project is run. If you need to fix the seed to have reproducible results, use [method seed] to initialize the random number generator.
</description>
</method>
<method name="range_lerp">

View file

@ -1349,6 +1349,8 @@ SceneTree::SceneTree() {
GLOBAL_DEF("debug/shapes/collision/draw_2d_outlines", true);
Math::randomize();
// Create with mainloop.
root = memnew(Window);