diff options
Diffstat (limited to 'server/src/entity/portal.rs')
-rw-r--r-- | server/src/entity/portal.rs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/server/src/entity/portal.rs b/server/src/entity/portal.rs index 2d4a762b..e0ec353f 100644 --- a/server/src/entity/portal.rs +++ b/server/src/entity/portal.rs @@ -1,3 +1,5 @@ +use std::collections::VecDeque; + /* Hurry Curry! - a game about cooking Copyright 2024 metamuffin @@ -18,7 +20,7 @@ use super::EntityT; use crate::game::{interact_effect, Game}; use anyhow::{anyhow, Result}; -use hurrycurry_protocol::{glam::IVec2, ItemLocation}; +use hurrycurry_protocol::{glam::IVec2, ItemLocation, PacketC}; #[derive(Debug, Default, Clone)] pub struct Portal { @@ -27,7 +29,12 @@ pub struct Portal { } impl EntityT for Portal { - 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<()> { let [from, to] = game .tiles .get_many_mut([&self.from, &self.to]) @@ -42,7 +49,7 @@ impl EntityT for Portal { &mut from.item, ItemLocation::Tile(self.from), Some(to.kind), - &mut game.packet_out, + packet_out, &mut game.score, true, ); |