diff options
author | metamuffin <metamuffin@disroot.org> | 2024-09-18 16:16:58 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-09-18 16:16:58 +0200 |
commit | 9d1c30cf9ef5a057c760da49b52312de4a5afc6a (patch) | |
tree | f6532fd40259f7e54d068a656f3aaecf98c22682 /server/src/entity/mod.rs | |
parent | fb6ca2a4b9d78dd80dbdf37b2926d9ede4108e8b (diff) | |
download | hurrycurry-9d1c30cf9ef5a057c760da49b52312de4a5afc6a.tar hurrycurry-9d1c30cf9ef5a057c760da49b52312de4a5afc6a.tar.bz2 hurrycurry-9d1c30cf9ef5a057c760da49b52312de4a5afc6a.tar.zst |
prevent multiple tutorials at once
Diffstat (limited to 'server/src/entity/mod.rs')
-rw-r--r-- | server/src/entity/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/entity/mod.rs b/server/src/entity/mod.rs index 532031d5..aa565c83 100644 --- a/server/src/entity/mod.rs +++ b/server/src/entity/mod.rs @@ -40,7 +40,7 @@ use hurrycurry_protocol::{ use item_portal::ItemPortal; use player_portal::PlayerPortal; use serde::{Deserialize, Serialize}; -use std::collections::VecDeque; +use std::{any::Any, collections::VecDeque}; pub type DynEntity = Box<dyn Entity + Send + Sync + 'static>; pub type Entities = Vec<DynEntity>; @@ -55,7 +55,7 @@ pub struct EntityContext<'a> { pub dt: f32, } -pub trait Entity { +pub trait Entity: Any { fn tick(&mut self, _c: EntityContext<'_>) -> Result<()> { Ok(()) } |