mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Clean up warnings
This commit is contained in:
parent
54a7112ad9
commit
49c7143144
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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<f32>,
|
||||
stats: &Stats,
|
||||
_stats: &Stats,
|
||||
) -> SfxEvent {
|
||||
// Match run state
|
||||
if physics_state.on_ground && vel.magnitude() > 0.1 {
|
||||
|
Loading…
Reference in New Issue
Block a user