diff options
Diffstat (limited to 'server/src/entity/customers')
-rw-r--r-- | server/src/entity/customers/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/src/entity/customers/mod.rs b/server/src/entity/customers/mod.rs index e8679dc9..974ae686 100644 --- a/server/src/entity/customers/mod.rs +++ b/server/src/entity/customers/mod.rs @@ -22,7 +22,7 @@ use super::EntityT; use crate::{data::Demand, game::Game}; use anyhow::{anyhow, Result}; use fake::{faker, Fake}; -use hurrycurry_protocol::{glam::IVec2, DemandIndex, Message, PacketS, PlayerID}; +use hurrycurry_protocol::{glam::IVec2, DemandIndex, Message, PacketC, PacketS, PlayerID}; use log::{info, warn}; use pathfinding::{find_path, Path}; use rand::{random, thread_rng}; @@ -74,7 +74,7 @@ impl Customers { } impl EntityT for Customers { - fn tick(&mut self, game: &mut Game, dt: f32) -> Result<()> { + fn tick(&mut self, game: &mut Game, packet_out: &mut VecDeque<PacketC>, dt: f32) -> Result<()> { self.spawn_cooldown -= dt; self.spawn_cooldown = self.spawn_cooldown.max(0.); if self.customers.len() < 5 && self.spawn_cooldown <= 0. { @@ -253,7 +253,7 @@ impl EntityT for Customers { self.customers.remove(&c).unwrap(); } for (player, packet) in self.cpackets.drain(..) { - if let Err(err) = game.packet_in(player, packet, &mut vec![]) { + if let Err(err) = game.packet_in(player, packet, &mut vec![], packet_out) { warn!("demand packet {err}"); } } |