diff options
Diffstat (limited to 'pixel-client/src/menu/background.rs')
-rw-r--r-- | pixel-client/src/menu/background.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pixel-client/src/menu/background.rs b/pixel-client/src/menu/background.rs index 84ec3f34..13cb041d 100644 --- a/pixel-client/src/menu/background.rs +++ b/pixel-client/src/menu/background.rs @@ -23,7 +23,7 @@ use hurrycurry_protocol::{ glam::{IVec2, Vec2}, TileIndex, }; -use rand::{random, seq::IndexedRandom, thread_rng}; +use rand::{random, rng, seq::IndexedRandom}; pub struct MenuBackground { background: Vec2, @@ -54,7 +54,7 @@ impl MenuBackground { let p = Vec2::new(x as f32, y as f32); let w = (-p.length() * 0.15).exp(); let k = ((random::<f32>() * w) * BUCKETS.len() as f32) as usize; - if let Some(ti) = BUCKETS[k.min(BUCKETS.len())].choose(&mut thread_rng()) { + if let Some(ti) = BUCKETS[k.min(BUCKETS.len())].choose(&mut rng()) { map.set(IVec2::new(x, y), Some(TileIndex(*ti)), [None; 4]) } } |