From 9fd258eaf6a988ebceb6ebb420084beaa40e0c73 Mon Sep 17 00:00:00 2001 From: timokoesters Date: Sat, 31 Aug 2019 09:00:20 +0200 Subject: [PATCH] Remove old code --- client/src/lib.rs | 6 ------ common/src/comp/animation.rs | 37 ------------------------------------ common/src/comp/mod.rs | 2 -- common/src/state.rs | 3 --- 4 files changed, 48 deletions(-) delete mode 100644 common/src/comp/animation.rs diff --git a/client/src/lib.rs b/client/src/lib.rs index c74050b4b6..1dd3cc0e1c 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -100,12 +100,6 @@ impl Client { // We reduce the thread count by 1 to keep rendering smooth thread_pool.set_num_threads((num_cpus::get() - 1).max(1)); - // Set client-only components - let _ = state - .ecs_mut() - .write_storage() - .insert(entity, comp::AnimationInfo::default()); - Ok(Self { client_state, thread_pool, diff --git a/common/src/comp/animation.rs b/common/src/comp/animation.rs deleted file mode 100644 index 001d292059..0000000000 --- a/common/src/comp/animation.rs +++ /dev/null @@ -1,37 +0,0 @@ -use specs::{Component, FlaggedStorage}; -use specs_idvs::IDVStorage; - -#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] -pub enum Animation { - Idle, - Stand, - Run, - Lean, - Jump, - Gliding, - Attack, - Block, - Roll, - Crun, - Cidle, - Cjump, -} - -#[derive(Copy, Clone, Debug, Serialize, Deserialize)] -pub struct AnimationInfo { - pub animation: Animation, - pub time: f64, -} - -impl Default for AnimationInfo { - fn default() -> Self { - Self { - animation: Animation::Idle, - time: 0.0, - } - } -} - -impl Component for AnimationInfo { - type Storage = FlaggedStorage>; -} diff --git a/common/src/comp/mod.rs b/common/src/comp/mod.rs index 18bb53be8b..450b67b271 100644 --- a/common/src/comp/mod.rs +++ b/common/src/comp/mod.rs @@ -1,6 +1,5 @@ mod admin; mod agent; -mod animation; mod body; mod character_state; mod controller; @@ -15,7 +14,6 @@ mod visual; // Reexports pub use admin::Admin; pub use agent::Agent; -pub use animation::{Animation, AnimationInfo}; pub use body::{humanoid, object, quadruped, quadruped_medium, Body}; pub use character_state::{ActionState, CharacterState, MovementState}; pub use controller::Controller; diff --git a/common/src/state.rs b/common/src/state.rs index fbe80d206b..43c9d5a9ba 100644 --- a/common/src/state.rs +++ b/common/src/state.rs @@ -133,9 +133,6 @@ impl State { ecs.register::(); ecs.register::(); - // Register client-local components - ecs.register::(); - // Register server-local components ecs.register::>(); ecs.register::>();