diff options
Diffstat (limited to 'server/src/entity/customers.rs')
| -rw-r--r-- | server/src/entity/customers.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/server/src/entity/customers.rs b/server/src/entity/customers.rs index c1bfb525..f6a50fa8 100644 --- a/server/src/entity/customers.rs +++ b/server/src/entity/customers.rs @@ -16,12 +16,11 @@ */ use super::{Entity, EntityContext, bot::BotDriver}; -use crate::random_float; use anyhow::Result; use hurrycurry_bot::algos::Customer; use hurrycurry_locale::TrError; use hurrycurry_protocol::{Character, PlayerClass}; -use std::random::random; +use rand::random; pub struct Customers { customers: Vec<BotDriver<Customer>>, @@ -58,12 +57,12 @@ impl Entity for Customers { self.current_spawn_cooldown = self.current_spawn_cooldown.max(0.); if self.customers.len() < max_count && self.current_spawn_cooldown <= 0. { self.current_spawn_cooldown = - self.spawn_cooldown + random_float() * self.spawn_cooldown; + self.spawn_cooldown + random::<f32>() * self.spawn_cooldown; let bot = BotDriver::new( "".to_string(), Character { - color: random(..), - hairstyle: random(..), + color: random(), + hairstyle: random(), headwear: 0, }, PlayerClass::Customer, |