From aff34a4233aefa068a2c1b65081455b6cd11e918 Mon Sep 17 00:00:00 2001 From: Mike Welsh Date: Wed, 25 Nov 2020 23:46:27 -0800 Subject: [PATCH] core: Seed RNG with timestamp --- core/src/player.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/player.rs b/core/src/player.rs index 3f031d3a6..3fa16f6e9 100644 --- a/core/src/player.rs +++ b/core/src/player.rs @@ -238,7 +238,7 @@ impl Player { view_matrix: Default::default(), inverse_view_matrix: Default::default(), - rng: SmallRng::from_seed([0u8; 16]), // TODO(Herschel): Get a proper seed on all platforms. + rng: SmallRng::seed_from_u64(chrono::Utc::now().timestamp_millis() as u64), gc_arena: GcArena::new(ArenaParameters::default(), |gc_context| { GcRoot(GcCell::allocate(