From d6fc1c640a4840a0d09ee0c813d7077451dc5f2e Mon Sep 17 00:00:00 2001 From: jshipsey Date: Sun, 12 May 2019 22:39:16 -0400 Subject: [PATCH] pipeline fix Former-commit-id: 5de7ef7070f1d978206a4e303058411627fac138 --- common/src/comp/character.rs | 14 ++++---------- voxygen/src/anim/character/idle.rs | 10 +++++----- voxygen/src/anim/character/jump.rs | 4 ++-- voxygen/src/anim/character/mod.rs | 7 +------ voxygen/src/anim/character/run.rs | 3 --- voxygen/src/scene/figure.rs | 25 ++++++++++++------------- 6 files changed, 24 insertions(+), 39 deletions(-) diff --git a/common/src/comp/character.rs b/common/src/comp/character.rs index 7b4e4f9d65..c56dddde3e 100644 --- a/common/src/comp/character.rs +++ b/common/src/comp/character.rs @@ -62,27 +62,25 @@ pub enum Weapon { #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum Shoulder { - DefaultShoulder + DefaultShoulder, } #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum Draw { - DefaultDraw + DefaultDraw, } - use Belt::*; use Chest::*; +use Draw::*; use Foot::*; use Gender::*; use Hand::*; use Head::*; use Pants::*; use Race::*; -use Weapon::*; use Shoulder::*; -use Draw::*; - +use Weapon::*; const ALL_RACES: [Race; 6] = [Danari, Dwarf, Elf, Human, Orc, Undead]; const ALL_GENDERS: [Gender; 3] = [Female, Male, Unspecified]; @@ -96,8 +94,6 @@ const ALL_WEAPONS: [Weapon; 7] = [Daggers, SwordShield, Sword, Axe, Hammer, Bow, const ALL_SHOULDERS: [Shoulder; 1] = [DefaultShoulder]; const ALL_DRAW: [Draw; 1] = [DefaultDraw]; - - #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct Character { pub race: Race, @@ -111,7 +107,6 @@ pub struct Character { pub weapon: Weapon, pub shoulder: Shoulder, pub draw: Draw, - } impl Character { @@ -128,7 +123,6 @@ impl Character { weapon: *thread_rng().choose(&ALL_WEAPONS).unwrap(), shoulder: *thread_rng().choose(&ALL_SHOULDERS).unwrap(), draw: *thread_rng().choose(&ALL_DRAW).unwrap(), - } } } diff --git a/voxygen/src/anim/character/idle.rs b/voxygen/src/anim/character/idle.rs index 613f12fcbe..1a629d3b0b 100644 --- a/voxygen/src/anim/character/idle.rs +++ b/voxygen/src/anim/character/idle.rs @@ -58,11 +58,11 @@ impl Animation for IdleAnimation { next.shorts.offset = Vec3::new(5.5, 0.0, 2.0 + waveultra_slow * 0.3); next.shorts.ori = Quaternion::rotation_x(0.0); next.shorts.scale = Vec3::one(); - + next.l_hand.offset = Vec3::new( - -6.0, - -2.0 + waveultracos_slow * 0.15, - 11.5 + waveultra_slow * 0.5, + -6.0, + -2.0 + waveultracos_slow * 0.15, + 11.5 + waveultra_slow * 0.5, ); next.l_hand.ori = Quaternion::rotation_x(0.0 + waveultra_slow * 0.06); @@ -82,7 +82,7 @@ impl Animation for IdleAnimation { next.r_foot.offset = Vec3::new(4.1, -0.1, 8.0); next.r_foot.ori = Quaternion::identity(); - next.r_foot.scale = Vec3::one(); + next.r_foot.scale = Vec3::one(); next.weapon.offset = Vec3::new(-5.0, -6.0, 18.0); next.weapon.ori = Quaternion::rotation_y(2.5); diff --git a/voxygen/src/anim/character/jump.rs b/voxygen/src/anim/character/jump.rs index c7d8688126..acbd79adb0 100644 --- a/voxygen/src/anim/character/jump.rs +++ b/voxygen/src/anim/character/jump.rs @@ -26,8 +26,8 @@ impl Animation for JumpAnimation { let wavetest = (wave.cbrt()); let fuzzwave = (anim_time as f32 * 12.0).sin(); let wavecos = (anim_time as f32 * 14.0).cos(); - let wave_stop = (anim_time as f32 * 4.5).min(PI / 2.0).sin(); - let wave_stopalt = (anim_time as f32 * 5.0).min(PI / 2.0).sin(); + let wave_stop = (anim_time as f32 * 4.5).min(PI / 2.0).sin(); + let wave_stopalt = (anim_time as f32 * 5.0).min(PI / 2.0).sin(); let wave_slowtest = (anim_time as f32).min(PI / 2.0).sin(); let wavecos_slow = (anim_time as f32 * 8.0 + PI).cos(); diff --git a/voxygen/src/anim/character/mod.rs b/voxygen/src/anim/character/mod.rs index 71e0f8a7d5..8a348ce769 100644 --- a/voxygen/src/anim/character/mod.rs +++ b/voxygen/src/anim/character/mod.rs @@ -29,7 +29,6 @@ pub struct CharacterSkeleton { r_shoulder: Bone, torso: Bone, draw: Bone, - } impl CharacterSkeleton { @@ -48,7 +47,6 @@ impl CharacterSkeleton { r_shoulder: Bone::default(), torso: Bone::default(), draw: Bone::default(), - } } } @@ -90,10 +88,7 @@ impl Skeleton for CharacterSkeleton { self.weapon.interpolate(&target.weapon); self.l_shoulder.interpolate(&target.l_shoulder); self.r_shoulder.interpolate(&target.r_shoulder); - self.torso.interpolate(&target.torso); + self.torso.interpolate(&target.torso); self.draw.interpolate(&target.draw); - - - } } diff --git a/voxygen/src/anim/character/run.rs b/voxygen/src/anim/character/run.rs index 2637d60169..b79751c20b 100644 --- a/voxygen/src/anim/character/run.rs +++ b/voxygen/src/anim/character/run.rs @@ -79,9 +79,6 @@ impl Animation for RunAnimation { next.draw.ori = Quaternion::rotation_y(-0.2); next.draw.scale = Vec3::one(); - - - next } } diff --git a/voxygen/src/scene/figure.rs b/voxygen/src/scene/figure.rs index 0cfbcc9e5b..ee363764dc 100644 --- a/voxygen/src/scene/figure.rs +++ b/voxygen/src/scene/figure.rs @@ -14,7 +14,7 @@ use common::{ assets, comp::{ self, - character::{Belt, Character, Chest, Foot, Hand, Head, Pants, Weapon, Shoulder, Draw}, + character::{Belt, Character, Chest, Draw, Foot, Hand, Head, Pants, Shoulder, Weapon}, }, figure::Segment, msg, @@ -205,18 +205,17 @@ impl FigureModelCache { Vec3::new(2.5, 0.0, 0.0), ) } -// fn load_draw(draw: Draw) -> Mesh { -// Self::load_mesh( -// match draw { -// //Draw::DefaultDraw => "sword.vox", -// -// }, -// Vec3::new(0.0, 0.0, -2.0) -// -// -// ) -// } - + // fn load_draw(draw: Draw) -> Mesh { + // Self::load_mesh( + // match draw { + // //Draw::DefaultDraw => "sword.vox", + // + // }, + // Vec3::new(0.0, 0.0, -2.0) + // + // + // ) + // } } pub struct FigureMgr {