aboutsummaryrefslogtreecommitdiff
path: root/server/src/entity/tram.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/entity/tram.rs')
-rw-r--r--server/src/entity/tram.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/src/entity/tram.rs b/server/src/entity/tram.rs
index 3186b650..391d16a9 100644
--- a/server/src/entity/tram.rs
+++ b/server/src/entity/tram.rs
@@ -1,3 +1,5 @@
+use std::random::random;
+
/*
Hurry Curry! - a game about cooking
Copyright (C) 2025 Hurry Curry! Contributors
@@ -17,8 +19,7 @@
*/
use super::{Entity, EntityContext};
use anyhow::Result;
-use hurrycurry_protocol::{glam::Vec2, Character, PacketS, PlayerClass, PlayerID};
-use rand::random;
+use hurrycurry_protocol::{Character, PacketS, PlayerClass, PlayerID, glam::Vec2};
pub struct Tram {
pub length: usize,
@@ -37,7 +38,7 @@ impl Entity for Tram {
fn tick(&mut self, c: EntityContext<'_>) -> Result<()> {
if self.ids.is_empty() {
for i in 0..self.length {
- let id = PlayerID(random());
+ let id = PlayerID(random(..));
c.packet_in.push_back(PacketS::Join {
name: format!("Tram {i}"),
character: self.character,