From 854361cdaa42eee6f3bbca223c53caae05429f5d Mon Sep 17 00:00:00 2001 From: jshipsey Date: Fri, 7 Aug 2020 01:51:50 -0400 Subject: [PATCH] changelog --- voxygen/src/anim/Cargo.toml | 2 +- voxygen/src/anim/src/character/mod.rs | 4 ++-- voxygen/src/anim/src/character/swim.rs | 16 ++++++------- voxygen/src/scene/figure/mod.rs | 32 ++++++++++++-------------- 4 files changed, 26 insertions(+), 28 deletions(-) diff --git a/voxygen/src/anim/Cargo.toml b/voxygen/src/anim/Cargo.toml index 92ce71acb0..ab4d0e2bfe 100644 --- a/voxygen/src/anim/Cargo.toml +++ b/voxygen/src/anim/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" name = "voxygen_anim" # Uncomment to use animation hot reloading # Note: this breaks `cargo test` -crate-type = ["lib", "cdylib"] +# crate-type = ["lib", "cdylib"] [features] use-dyn-lib = ["libloading", "notify", "lazy_static", "tracing", "find_folder"] diff --git a/voxygen/src/anim/src/character/mod.rs b/voxygen/src/anim/src/character/mod.rs index 0e3d677e32..7f2ef17a49 100644 --- a/voxygen/src/anim/src/character/mod.rs +++ b/voxygen/src/anim/src/character/mod.rs @@ -32,8 +32,8 @@ pub use self::{ glidewield::GlideWieldAnimation, gliding::GlidingAnimation, idle::IdleAnimation, jump::JumpAnimation, leapmelee::LeapAnimation, roll::RollAnimation, run::RunAnimation, shoot::ShootAnimation, sit::SitAnimation, sneak::SneakAnimation, spin::SpinAnimation, - spinmelee::SpinMeleeAnimation, stand::StandAnimation, swim::SwimAnimation, swimwield::SwimWieldAnimation, - wield::WieldAnimation, + spinmelee::SpinMeleeAnimation, stand::StandAnimation, swim::SwimAnimation, + swimwield::SwimWieldAnimation, wield::WieldAnimation, }; use super::{Bone, FigureBoneData, Skeleton}; diff --git a/voxygen/src/anim/src/character/swim.rs b/voxygen/src/anim/src/character/swim.rs index 7f0bc32e47..75ea32dfa2 100644 --- a/voxygen/src/anim/src/character/swim.rs +++ b/voxygen/src/anim/src/character/swim.rs @@ -40,7 +40,7 @@ impl Animation for SwimAnimation { let lab = 1.0 * tempo; - let short = (anim_time as f32 * lab as f32 * 6.0+ PI/2.0).sin(); + let short = (anim_time as f32 * lab as f32 * 6.0 + PI / 2.0).sin(); let foot = (anim_time as f32 * lab as f32 * 6.0).sin(); @@ -92,7 +92,7 @@ impl Animation for SwimAnimation { -3.0 + skeleton_attr.head.0, skeleton_attr.head.1 - 1.0 + short * 0.3, ); - next.head.ori = Quaternion::rotation_z(head_look.x*0.5 + short * -0.2 * intensity) + next.head.ori = Quaternion::rotation_z(head_look.x * 0.5 + short * -0.2 * intensity) * Quaternion::rotation_x( (0.4 * head_look.y * (1.0 / intensity)).abs() + 0.45 * intensity @@ -123,21 +123,21 @@ impl Animation for SwimAnimation { next.shorts.scale = Vec3::one(); next.l_hand.offset = Vec3::new( - -1.0-skeleton_attr.hand.0, + -1.0 - skeleton_attr.hand.0, 1.5 + skeleton_attr.hand.1 - foot * 2.0 * intensity, 5.0 + skeleton_attr.hand.2 + foot * -5.0 * intensity, ); - next.l_hand.ori = - Quaternion::rotation_x(1.5 + foot * -1.2 * intensity) * Quaternion::rotation_y(0.4+foot*-0.35); + next.l_hand.ori = Quaternion::rotation_x(1.5 + foot * -1.2 * intensity) + * Quaternion::rotation_y(0.4 + foot * -0.35); next.l_hand.scale = Vec3::one(); next.r_hand.offset = Vec3::new( - 1.0+skeleton_attr.hand.0, + 1.0 + skeleton_attr.hand.0, 1.5 + skeleton_attr.hand.1 + foot * 2.0 * intensity, 5.0 + skeleton_attr.hand.2 + foot * 5.0 * intensity, ); - next.r_hand.ori = - Quaternion::rotation_x(1.5 + foot * 1.2 * intensity) * Quaternion::rotation_y(-0.4+foot*-0.35); + next.r_hand.ori = Quaternion::rotation_x(1.5 + foot * 1.2 * intensity) + * Quaternion::rotation_y(-0.4 + foot * -0.35); next.r_hand.scale = Vec3::one(); next.l_foot.offset = Vec3::new( diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index 541d88b19f..68c0861f2b 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -824,24 +824,22 @@ impl FigureMgr { }, CharacterState::Wielding { .. } => { if physics.in_fluid { - anim::character::SwimWieldAnimation::update_skeleton( - &target_base, - (active_tool_kind, second_tool_kind, vel.0.magnitude(), time), - state.state_time, - &mut state_animation_rate, - skeleton_attr, - ) + anim::character::SwimWieldAnimation::update_skeleton( + &target_base, + (active_tool_kind, second_tool_kind, vel.0.magnitude(), time), + state.state_time, + &mut state_animation_rate, + skeleton_attr, + ) + } else { + anim::character::WieldAnimation::update_skeleton( + &target_base, + (active_tool_kind, second_tool_kind, vel.0.magnitude(), time), + state.state_time, + &mut state_animation_rate, + skeleton_attr, + ) } - else{ - anim::character::WieldAnimation::update_skeleton( - &target_base, - (active_tool_kind, second_tool_kind, vel.0.magnitude(), time), - state.state_time, - &mut state_animation_rate, - skeleton_attr, -) - } - }, CharacterState::Glide { .. } => { anim::character::GlidingAnimation::update_skeleton(