From cf22cb99e776068e9542a5f2cc8d920093094d6e Mon Sep 17 00:00:00 2001 From: Forest Anderson Date: Thu, 9 May 2019 17:30:44 -0400 Subject: [PATCH] Ran fmt Former-commit-id: 6acf43d8e4c446b3f50a673179b8df20d6da648c --- common/src/sys/anim.rs | 5 +---- common/src/sys/mod.rs | 2 +- voxygen/src/anim/character/idle.rs | 12 ++++++++++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/common/src/sys/anim.rs b/common/src/sys/anim.rs index 1cc8415cc7..569fa5a459 100644 --- a/common/src/sys/anim.rs +++ b/common/src/sys/anim.rs @@ -12,10 +12,7 @@ use crate::{ pub struct Sys; impl<'a> System<'a> for Sys { - type SystemData = ( - Read<'a, DeltaTime>, - WriteStorage<'a, AnimationHistory>, - ); + type SystemData = (Read<'a, DeltaTime>, WriteStorage<'a, AnimationHistory>); fn run(&mut self, (dt, mut anim_history): Self::SystemData) { for (mut anim_history) in (&mut anim_history).join() { diff --git a/common/src/sys/mod.rs b/common/src/sys/mod.rs index df4b9567d1..18ece5816e 100644 --- a/common/src/sys/mod.rs +++ b/common/src/sys/mod.rs @@ -1,7 +1,7 @@ pub mod agent; +pub mod anim; pub mod control; pub mod phys; -pub mod anim; // External use specs::DispatcherBuilder; diff --git a/voxygen/src/anim/character/idle.rs b/voxygen/src/anim/character/idle.rs index 90412242c6..74472e622b 100644 --- a/voxygen/src/anim/character/idle.rs +++ b/voxygen/src/anim/character/idle.rs @@ -29,8 +29,16 @@ impl Animation for IdleAnimation { let wave_dip = (wave_slow.abs() - 0.5).abs(); let head_look = Vec2::new( - ((global_time + anim_time) as f32 / 5.0).floor().mul(7331.0).sin() * 0.5, - ((global_time + anim_time) as f32 / 5.0).floor().mul(1337.0).sin() * 0.25, + ((global_time + anim_time) as f32 / 5.0) + .floor() + .mul(7331.0) + .sin() + * 0.5, + ((global_time + anim_time) as f32 / 5.0) + .floor() + .mul(1337.0) + .sin() + * 0.25, ); next.head.offset = Vec3::new(5.5, 2.0, 11.5 + waveultra_slow * 0.4); next.head.ori = Quaternion::rotation_z(head_look.x) * Quaternion::rotation_x(head_look.y);