diff --git a/chat-cli/src/main.rs b/chat-cli/src/main.rs index 98361736b6..e58dca26fa 100644 --- a/chat-cli/src/main.rs +++ b/chat-cli/src/main.rs @@ -1,14 +1,7 @@ use client::{Client, Event}; use common::{clock::Clock, comp}; use log::{error, info}; -use std::{ - io, - net::{SocketAddr, ToSocketAddrs}, - str::FromStr, - sync::mpsc, - thread, - time::Duration, -}; +use std::{io, net::ToSocketAddrs, sync::mpsc, thread, time::Duration}; const TPS: u64 = 10; // Low value is okay, just reading messages. diff --git a/voxygen/src/anim/character/attack.rs b/voxygen/src/anim/character/attack.rs index b30a3d9d97..7e6c7c1576 100644 --- a/voxygen/src/anim/character/attack.rs +++ b/voxygen/src/anim/character/attack.rs @@ -2,7 +2,7 @@ use super::{ super::{Animation, SkeletonAttr}, CharacterSkeleton, }; -use std::{f32::consts::PI, ops::Mul}; +use std::f32::consts::PI; use vek::*; pub struct Input { @@ -16,7 +16,7 @@ impl Animation for AttackAnimation { fn update_skeleton( skeleton: &Self::Skeleton, - global_time: f64, + _global_time: f64, anim_time: f64, skeleton_attr: &SkeletonAttr, ) -> Self::Skeleton { @@ -25,7 +25,6 @@ impl Animation for AttackAnimation { let wave_quicken = 1.0 - (anim_time as f32 * 16.0).cos(); let wave_quicken_slow = 1.0 - (anim_time as f32 * 12.0).cos(); let wave_quicken_double = 1.0 - (anim_time as f32 * 24.0).cos(); - let wave_quick = (anim_time as f32 * 0.5).sin(); let wave_stop_quick = (anim_time as f32 * 16.0).min(PI / 2.0).sin(); next.head.offset = Vec3::new( diff --git a/voxygen/src/anim/character/cidle.rs b/voxygen/src/anim/character/cidle.rs index 139109518e..104856e410 100644 --- a/voxygen/src/anim/character/cidle.rs +++ b/voxygen/src/anim/character/cidle.rs @@ -22,8 +22,6 @@ impl Animation for CidleAnimation { ) -> Self::Skeleton { let mut next = (*skeleton).clone(); - let wave = (anim_time as f32 * 4.0).sin(); - let wave_ultra_slow = (anim_time as f32 * 3.0 + PI).sin(); let wave_ultra_slow_cos = (anim_time as f32 * 3.0 + PI).cos(); let wave_slow_cos = (anim_time as f32 * 6.0 + PI).cos(); diff --git a/voxygen/src/anim/character/cjump.rs b/voxygen/src/anim/character/cjump.rs index a585e923a6..6953e1913d 100644 --- a/voxygen/src/anim/character/cjump.rs +++ b/voxygen/src/anim/character/cjump.rs @@ -13,15 +13,14 @@ impl Animation for CjumpAnimation { fn update_skeleton( skeleton: &Self::Skeleton, - global_time: f64, + _global_time: f64, anim_time: f64, skeleton_attr: &SkeletonAttr, ) -> Self::Skeleton { let mut next = (*skeleton).clone(); - let wave = (anim_time as f32 * 14.0).sin(); + let wave_slow = (anim_time as f32 * 7.0).sin(); let wave_stop = (anim_time as f32 * 4.5).min(PI / 2.0).sin(); - let wave_stop_alt = (anim_time as f32 * 5.0).min(PI / 2.0).sin(); next.head.offset = Vec3::new( 0.0 + skeleton_attr.neck_right, diff --git a/voxygen/src/anim/character/gliding.rs b/voxygen/src/anim/character/gliding.rs index a13e41a469..d3d0bb5985 100644 --- a/voxygen/src/anim/character/gliding.rs +++ b/voxygen/src/anim/character/gliding.rs @@ -25,8 +25,6 @@ impl Animation for GlidingAnimation { let wave_very_slow_alt = (anim_time as f32 * 2.5).sin(); let wave_very_slow_cos = (anim_time as f32 * 3.0).cos(); - let wave_slow_test = (anim_time as f32).min(PI / 2.0).sin(); - let head_look = Vec2::new( ((global_time + anim_time) as f32 / 4.0) .floor() diff --git a/voxygen/src/anim/character/idle.rs b/voxygen/src/anim/character/idle.rs index f9f363c923..76951d78ad 100644 --- a/voxygen/src/anim/character/idle.rs +++ b/voxygen/src/anim/character/idle.rs @@ -22,8 +22,6 @@ impl Animation for IdleAnimation { ) -> Self::Skeleton { let mut next = (*skeleton).clone(); - let wave = (anim_time as f32 * 4.0).sin(); - let wave_ultra_slow = (anim_time as f32 * 1.0 + PI).sin(); let wave_ultra_slow_cos = (anim_time as f32 * 1.0 + PI).cos(); diff --git a/voxygen/src/anim/character/jump.rs b/voxygen/src/anim/character/jump.rs index 30f9dcb628..88b209c0af 100644 --- a/voxygen/src/anim/character/jump.rs +++ b/voxygen/src/anim/character/jump.rs @@ -13,7 +13,7 @@ impl Animation for JumpAnimation { fn update_skeleton( skeleton: &Self::Skeleton, - global_time: f64, + _global_time: f64, anim_time: f64, skeleton_attr: &SkeletonAttr, ) -> Self::Skeleton { diff --git a/voxygen/src/anim/character/mod.rs b/voxygen/src/anim/character/mod.rs index 65d15ec481..6165aeb170 100644 --- a/voxygen/src/anim/character/mod.rs +++ b/voxygen/src/anim/character/mod.rs @@ -22,8 +22,6 @@ pub use self::run::RunAnimation; use super::{Bone, Skeleton}; use crate::render::FigureBoneData; -const SCALE: f32 = 11.0; - #[derive(Clone)] pub struct CharacterSkeleton { head: Bone, diff --git a/voxygen/src/anim/character/roll.rs b/voxygen/src/anim/character/roll.rs index f4171024e8..3e828c2fee 100644 --- a/voxygen/src/anim/character/roll.rs +++ b/voxygen/src/anim/character/roll.rs @@ -2,7 +2,7 @@ use super::{ super::{Animation, SkeletonAttr}, CharacterSkeleton, }; -use std::{f32::consts::PI, ops::Mul}; +use std::f32::consts::PI; use vek::*; pub struct RollAnimation; @@ -13,7 +13,7 @@ impl Animation for RollAnimation { fn update_skeleton( skeleton: &Self::Skeleton, - global_time: f64, + _global_time: f64, anim_time: f64, skeleton_attr: &SkeletonAttr, ) -> Self::Skeleton { @@ -22,7 +22,6 @@ impl Animation for RollAnimation { let wave = (anim_time as f32 * 5.5).sin(); let wave_quick = (anim_time as f32 * 9.5).sin(); let wave_quick_cos = (anim_time as f32 * 9.5).cos(); - let wave_cos = (anim_time as f32 * 5.5).cos(); let wave_slow = (anim_time as f32 * 2.8 + PI).sin(); let wave_dub = (anim_time as f32 * 5.5).sin(); diff --git a/voxygen/src/anim/fixture/mod.rs b/voxygen/src/anim/fixture/mod.rs index b47d62913b..8238f69073 100644 --- a/voxygen/src/anim/fixture/mod.rs +++ b/voxygen/src/anim/fixture/mod.rs @@ -1,8 +1,6 @@ use super::Skeleton; use crate::render::FigureBoneData; -const SCALE: f32 = 44.0; - pub struct FixtureSkeleton; impl FixtureSkeleton { @@ -33,5 +31,5 @@ impl Skeleton for FixtureSkeleton { ] } - fn interpolate(&mut self, target: &Self, dt: f32) {} + fn interpolate(&mut self, _target: &Self, _dt: f32) {} } diff --git a/voxygen/src/anim/mod.rs b/voxygen/src/anim/mod.rs index 227dac1da8..64126d1635 100644 --- a/voxygen/src/anim/mod.rs +++ b/voxygen/src/anim/mod.rs @@ -87,7 +87,6 @@ impl<'a> From<&'a comp::humanoid::Body> for SkeletonAttr { (Undead, Female) => 0.93, (Danari, Male) => 0.85, (Danari, Female) => 0.82, - _ => 1.0, }, head_scale: match (body.race, body.body_type) { (Orc, Male) => 0.9, @@ -102,7 +101,6 @@ impl<'a> From<&'a comp::humanoid::Body> for SkeletonAttr { (Undead, Female) => 1.0, (Danari, Male) => 1.11, (Danari, Female) => 1.11, - _ => 1.0, }, neck_height: match (body.race, body.body_type) { (Orc, Male) => -2.0, @@ -117,7 +115,6 @@ impl<'a> From<&'a comp::humanoid::Body> for SkeletonAttr { (Undead, Female) => -0.5, (Danari, Male) => 0.5, (Danari, Female) => -0.5, - _ => 1.0, }, neck_forward: match (body.race, body.body_type) { (Orc, Male) => 1.0, @@ -132,7 +129,6 @@ impl<'a> From<&'a comp::humanoid::Body> for SkeletonAttr { (Undead, Female) => 1.0, (Danari, Male) => 0.5, (Danari, Female) => 0.0, - _ => 1.0, }, neck_right: match (body.race, body.body_type) { (Orc, Male) => 0.0, @@ -147,7 +143,6 @@ impl<'a> From<&'a comp::humanoid::Body> for SkeletonAttr { (Undead, Female) => 0.0, (Danari, Male) => 0.0, (Danari, Female) => 0.0, - _ => 1.0, }, weapon_x: match Weapon::Sword { // TODO: Inventory @@ -158,8 +153,6 @@ impl<'a> From<&'a comp::humanoid::Body> for SkeletonAttr { Weapon::Staff => 3.0, Weapon::Bow => 0.0, Weapon::Daggers => 0.0, - - _ => 1.0, }, weapon_y: match Weapon::Sword { // TODO: Inventory @@ -170,8 +163,6 @@ impl<'a> From<&'a comp::humanoid::Body> for SkeletonAttr { Weapon::Staff => 0.0, Weapon::Bow => -2.0, Weapon::Daggers => -2.0, - - _ => 1.0, }, } } diff --git a/voxygen/src/anim/quadruped/idle.rs b/voxygen/src/anim/quadruped/idle.rs index 5d46bd769d..8477a2c9c1 100644 --- a/voxygen/src/anim/quadruped/idle.rs +++ b/voxygen/src/anim/quadruped/idle.rs @@ -15,7 +15,7 @@ impl Animation for IdleAnimation { skeleton: &Self::Skeleton, global_time: Self::Dependency, anim_time: f64, - skeleton_attr: &SkeletonAttr, + _skeleton_attr: &SkeletonAttr, ) -> Self::Skeleton { let mut next = (*skeleton).clone(); diff --git a/voxygen/src/anim/quadruped/jump.rs b/voxygen/src/anim/quadruped/jump.rs index f42d7b010d..19d9075428 100644 --- a/voxygen/src/anim/quadruped/jump.rs +++ b/voxygen/src/anim/quadruped/jump.rs @@ -13,9 +13,9 @@ impl Animation for JumpAnimation { fn update_skeleton( skeleton: &Self::Skeleton, - (velocity, global_time): Self::Dependency, + (_velocity, _global_time): Self::Dependency, anim_time: f64, - skeleton_attr: &SkeletonAttr, + _skeleton_attr: &SkeletonAttr, ) -> Self::Skeleton { let mut next = (*skeleton).clone(); diff --git a/voxygen/src/anim/quadruped/mod.rs b/voxygen/src/anim/quadruped/mod.rs index 51e4a23666..662c641b38 100644 --- a/voxygen/src/anim/quadruped/mod.rs +++ b/voxygen/src/anim/quadruped/mod.rs @@ -10,8 +10,6 @@ pub use self::run::RunAnimation; use super::{Bone, Skeleton}; use crate::render::FigureBoneData; -const SCALE: f32 = 11.0; - #[derive(Clone)] pub struct QuadrupedSkeleton { pig_head: Bone, diff --git a/voxygen/src/anim/quadruped/run.rs b/voxygen/src/anim/quadruped/run.rs index 543c98f49f..327f2bf559 100644 --- a/voxygen/src/anim/quadruped/run.rs +++ b/voxygen/src/anim/quadruped/run.rs @@ -2,7 +2,6 @@ use super::{ super::{Animation, SkeletonAttr}, QuadrupedSkeleton, }; -use std::f32::consts::PI; use vek::*; pub struct RunAnimation; @@ -13,9 +12,9 @@ impl Animation for RunAnimation { fn update_skeleton( skeleton: &Self::Skeleton, - (velocity, global_time): Self::Dependency, + (_velocity, _global_time): Self::Dependency, anim_time: f64, - skeleton_attr: &SkeletonAttr, + _skeleton_attr: &SkeletonAttr, ) -> Self::Skeleton { let mut next = (*skeleton).clone(); diff --git a/voxygen/src/anim/quadrupedmedium/idle.rs b/voxygen/src/anim/quadrupedmedium/idle.rs index e42ed053ca..568d1c511d 100644 --- a/voxygen/src/anim/quadrupedmedium/idle.rs +++ b/voxygen/src/anim/quadrupedmedium/idle.rs @@ -15,7 +15,7 @@ impl Animation for IdleAnimation { skeleton: &Self::Skeleton, global_time: Self::Dependency, anim_time: f64, - skeleton_attr: &SkeletonAttr, + _skeleton_attr: &SkeletonAttr, ) -> Self::Skeleton { let mut next = (*skeleton).clone(); diff --git a/voxygen/src/anim/quadrupedmedium/jump.rs b/voxygen/src/anim/quadrupedmedium/jump.rs index 9c974e9226..7708083852 100644 --- a/voxygen/src/anim/quadrupedmedium/jump.rs +++ b/voxygen/src/anim/quadrupedmedium/jump.rs @@ -13,9 +13,9 @@ impl Animation for JumpAnimation { fn update_skeleton( skeleton: &Self::Skeleton, - global_time: Self::Dependency, + _global_time: Self::Dependency, anim_time: f64, - skeleton_attr: &SkeletonAttr, + _skeleton_attr: &SkeletonAttr, ) -> Self::Skeleton { let mut next = (*skeleton).clone(); diff --git a/voxygen/src/anim/quadrupedmedium/mod.rs b/voxygen/src/anim/quadrupedmedium/mod.rs index ea40e20f2d..1941442eac 100644 --- a/voxygen/src/anim/quadrupedmedium/mod.rs +++ b/voxygen/src/anim/quadrupedmedium/mod.rs @@ -10,8 +10,6 @@ pub use self::run::RunAnimation; use super::{Bone, Skeleton}; use crate::render::FigureBoneData; -const SCALE: f32 = 11.0; - #[derive(Clone)] pub struct QuadrupedMediumSkeleton { wolf_head_upper: Bone, diff --git a/voxygen/src/anim/quadrupedmedium/run.rs b/voxygen/src/anim/quadrupedmedium/run.rs index 9fbe593085..5fd7a5d8cd 100644 --- a/voxygen/src/anim/quadrupedmedium/run.rs +++ b/voxygen/src/anim/quadrupedmedium/run.rs @@ -13,9 +13,9 @@ impl Animation for RunAnimation { fn update_skeleton( skeleton: &Self::Skeleton, - (velocity, global_time): Self::Dependency, + (_velocity, global_time): Self::Dependency, anim_time: f64, - skeleton_attr: &SkeletonAttr, + _skeleton_attr: &SkeletonAttr, ) -> Self::Skeleton { let mut next = (*skeleton).clone(); @@ -39,18 +39,6 @@ impl Animation for RunAnimation { .sin() * 0.125, ); - let wolf_tail = Vec2::new( - ((global_time + anim_time) as f32 / 2.0) - .floor() - .mul(7331.0) - .sin() - * 0.25, - ((global_time + anim_time) as f32 / 2.0) - .floor() - .mul(1337.0) - .sin() - * 0.125, - ); next.wolf_head_upper.offset = Vec3::new(0.0, 9.5 + wave_quick_cos * 2.0, 15.0 + wave_med * 3.0) / 11.0;