diff --git a/common/src/comp/controller.rs b/common/src/comp/controller.rs index a513f619cc..8b88f488c4 100644 --- a/common/src/comp/controller.rs +++ b/common/src/comp/controller.rs @@ -67,7 +67,7 @@ impl Input { /// Whether input has been pressed for longer than `threshold` pub fn is_long_press(&self, threshold: Duration) -> bool { - (self.is_pressed() && self.duration >= threshold) + self.is_pressed() && self.duration >= threshold } /// Handles logic of updating state of Input diff --git a/common/src/sys/character_behavior.rs b/common/src/sys/character_behavior.rs index 576e95c30d..1179a3c196 100644 --- a/common/src/sys/character_behavior.rs +++ b/common/src/sys/character_behavior.rs @@ -1,7 +1,7 @@ use crate::{ comp::{ AbilityPool, Body, CharacterState, Controller, ControllerInputs, Energy, Mounting, Ori, - PhysicsState, Pos, StateUpdate, Stats, Vel, + PhysicsState, Pos, Stats, Vel, }, event::{EventBus, LocalEvent, ServerEvent}, state::DeltaTime, @@ -11,7 +11,7 @@ use crate::{ use specs::{Entities, Entity, Join, LazyUpdate, Read, ReadStorage, System, WriteStorage}; -use std::collections::VecDeque; +// use std::collections::VecDeque; /// Read-Only Data sent from Character Behavior System to bahvior fn's pub struct JoinData<'a> { @@ -171,15 +171,15 @@ impl<'a> System<'a> for Sys { CharacterState::BasicBlock { .. } => states::basic_block::behavior(&j), CharacterState::Sit { .. } => states::sit::behavior(&j), - _ => StateUpdate { - character: *j.character, - pos: *j.pos, - vel: *j.vel, - ori: *j.ori, - energy: *j.energy, - local_events: VecDeque::new(), - server_events: VecDeque::new(), - }, + // _ => StateUpdate { + // character: *j.character, + // pos: *j.pos, + // vel: *j.vel, + // ori: *j.ori, + // energy: *j.energy, + // local_events: VecDeque::new(), + // server_events: VecDeque::new(), + // }, }; *tuple.2 = state_update.character; diff --git a/common/src/sys/combat.rs b/common/src/sys/combat.rs index 0024e639a5..6918df5eab 100644 --- a/common/src/sys/combat.rs +++ b/common/src/sys/combat.rs @@ -1,14 +1,14 @@ use crate::{ comp::{ - Attacking, Body, CharacterState, Controller, HealthChange, HealthSource, Item, ItemKind, - Ori, Pos, Scale, Stats, + Attacking, Body, CharacterState, Controller, HealthChange, HealthSource, Ori, Pos, Scale, + Stats, }, event::{EventBus, LocalEvent, ServerEvent}, state::DeltaTime, sync::Uid, }; use specs::{Entities, Join, Read, ReadStorage, System, WriteStorage}; -use std::time::Duration; +// use std::time::Duration; use vek::*; const BLOCK_EFFICIENCY: f32 = 0.9; @@ -42,8 +42,8 @@ impl<'a> System<'a> for Sys { ( entities, server_bus, - local_bus, - dt, + _local_bus, + _dt, uids, positions, orientations, @@ -52,11 +52,11 @@ impl<'a> System<'a> for Sys { bodies, stats, mut attacking_storage, - mut character_states, + character_states, ): Self::SystemData, ) { // Attacks - for (entity, uid, pos, ori, scale_maybe, _, attacker_stats, attack) in ( + for (entity, uid, pos, ori, scale_maybe, _, _attacker_stats, attack) in ( &entities, &uids, &positions, diff --git a/common/src/sys/controller.rs b/common/src/sys/controller.rs index b8dee638b2..4a0e033651 100644 --- a/common/src/sys/controller.rs +++ b/common/src/sys/controller.rs @@ -1,9 +1,6 @@ use crate::{ - comp::{ - item, projectile, Body, ControlEvent, Controller, ControllerInputs, Energy, EnergySource, - HealthChange, HealthSource, ItemKind, Mounting, PhysicsState, Projectile, Stats, Vel, - }, - event::{Emitter, EventBus, LocalEvent, ServerEvent}, + comp::{ControlEvent, Controller}, + event::{EventBus, LocalEvent, ServerEvent}, state::DeltaTime, sync::{Uid, UidAllocator}, }; @@ -12,8 +9,8 @@ use specs::{ Entities, Join, Read, ReadStorage, System, WriteStorage, }; -const CHARGE_COST: i32 = 200; -const ROLL_COST: i32 = 30; +// const CHARGE_COST: i32 = 200; +// const ROLL_COST: i32 = 30; pub struct Sys; diff --git a/voxygen/src/anim/mod.rs b/voxygen/src/anim/mod.rs index 590f67abb1..df32446f5c 100644 --- a/voxygen/src/anim/mod.rs +++ b/voxygen/src/anim/mod.rs @@ -58,6 +58,9 @@ pub trait Skeleton: Send + Sync + 'static { fn interpolate(&mut self, target: &Self, dt: f32); } +// rustc complains that `SkeletonAttr` fields are never read. +// Pls remove when they are. +#[allow(dead_code)] pub struct SkeletonAttr { scaler: f32, head_scale: f32, diff --git a/voxygen/src/audio/sfx/event_mapper/movement/mod.rs b/voxygen/src/audio/sfx/event_mapper/movement/mod.rs index fee6ddd4ea..084dc47ea2 100644 --- a/voxygen/src/audio/sfx/event_mapper/movement/mod.rs +++ b/voxygen/src/audio/sfx/event_mapper/movement/mod.rs @@ -4,7 +4,7 @@ use crate::audio::sfx::{SfxTriggerItem, SfxTriggers}; use common::{ - comp::{Body, CharacterState, Item, ItemKind, PhysicsState, Pos, Stats, ToolData, Vel}, + comp::{Body, CharacterState, PhysicsState, Pos, Stats, Vel}, event::{EventBus, SfxEvent, SfxEventItem}, state::State, }; @@ -156,7 +156,7 @@ impl MovementEventMapper { physics_state: &PhysicsState, previous_state: &PreviousEntityState, vel: Vec3, - stats: &Stats, + _stats: &Stats, ) -> SfxEvent { // Match run state if physics_state.on_ground && vel.magnitude() > 0.1 {