diff --git a/voxygen/src/anim/character/cidle.rs b/voxygen/src/anim/character/cidle.rs index e37bcb7dbc..6557b97984 100644 --- a/voxygen/src/anim/character/cidle.rs +++ b/voxygen/src/anim/character/cidle.rs @@ -60,178 +60,167 @@ impl Animation for CidleAnimation { next.shorts.ori = Quaternion::rotation_x(0.0); next.shorts.scale = Vec3::one(); - -if skeleton_attr.weapon_id == 1.0{ - next.l_hand.offset = Vec3::new( - -6.0 + wave_ultra_slow_cos * 1.0, - 3.5 + wave_ultra_slow_cos * 0.5, - 0.0 + wave_ultra_slow * 1.0, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - -6.0 + wave_ultra_slow_cos * 1.0, - 3.0 + wave_ultra_slow_cos * 0.5, - -2.0 + wave_ultra_slow * 1.0, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - -6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0, - 4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5, - 0.0 + wave_ultra_slow * 1.0, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.weapon.scale = Vec3::one(); - } -else if skeleton_attr.weapon_id == 2.0{ next.l_hand.offset = Vec3::new( - -6.0 + wave_ultra_slow_cos * 1.0, - 3.5 + wave_ultra_slow_cos * 0.5, - 0.0 + wave_ultra_slow * 1.0, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - -6.0 + wave_ultra_slow_cos * 1.0, - 3.0 + wave_ultra_slow_cos * 0.5, - -2.0 + wave_ultra_slow * 1.0, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - -6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0, - 4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5, - 0.0 + wave_ultra_slow * 1.0, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.weapon.scale = Vec3::one(); - } -else if skeleton_attr.weapon_id == 3.0{ next.l_hand.offset = Vec3::new( - -7.0, - 8.25, - 2.0, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3) * Quaternion::rotation_y(-1.2) - * Quaternion::rotation_z(wave_ultra_slow * 0.2); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - 7.0, - 7.0, - -3.0, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3) * Quaternion::rotation_y(-1.2) - * Quaternion::rotation_z(wave_ultra_slow * 0.2); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - 5.0 + skeleton_attr.weapon_x, - 8.75 + skeleton_attr.weapon_y, - -2.5, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(-1.2) - * Quaternion::rotation_z(wave_ultra_slow * 0.2); - next.weapon.scale = Vec3::one(); - } -else if skeleton_attr.weapon_id == 4.0{ next.l_hand.offset = Vec3::new( - -6.0 + wave_ultra_slow_cos * 1.0, - 3.5 + wave_ultra_slow_cos * 0.5, - 0.0 + wave_ultra_slow * 1.0, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - -6.0 + wave_ultra_slow_cos * 1.0, - 3.0 + wave_ultra_slow_cos * 0.5, - -2.0 + wave_ultra_slow * 1.0, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - -6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0, - 4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5, - 0.0 + wave_ultra_slow * 1.0, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.weapon.scale = Vec3::one(); - } -else if skeleton_attr.weapon_id == 5.0{ next.l_hand.offset = Vec3::new( - -6.0 + wave_ultra_slow_cos * 1.0, - 3.5 + wave_ultra_slow_cos * 0.5, - 0.0 + wave_ultra_slow * 1.0, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - -6.0 + wave_ultra_slow_cos * 1.0, - 3.0 + wave_ultra_slow_cos * 0.5, - -2.0 + wave_ultra_slow * 1.0, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - -6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0, - 4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5, - 0.0 + wave_ultra_slow * 1.0, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.weapon.scale = Vec3::one(); - } -else if skeleton_attr.weapon_id == 6.0{ next.l_hand.offset = Vec3::new( - -6.0 + wave_ultra_slow_cos * 1.0, - 3.5 + wave_ultra_slow_cos * 0.5, - 0.0 + wave_ultra_slow * 1.0, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - -6.0 + wave_ultra_slow_cos * 1.0, - 3.0 + wave_ultra_slow_cos * 0.5, - -2.0 + wave_ultra_slow * 1.0, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - -6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0, - 4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5, - 0.0 + wave_ultra_slow * 1.0, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.weapon.scale = Vec3::one(); - } -else if skeleton_attr.weapon_id == 7.0{ next.l_hand.offset = Vec3::new( - -6.0 + wave_ultra_slow_cos * 1.0, - 3.5 + wave_ultra_slow_cos * 0.5, - 0.0 + wave_ultra_slow * 1.0, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - -6.0, - 3.0, - -2.0, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - -6.0 + skeleton_attr.weapon_x, - 4.5 + skeleton_attr.weapon_y, - 0.0, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.weapon.scale = Vec3::one(); - } + if skeleton_attr.weapon_id == 1.0 { + next.l_hand.offset = Vec3::new( + -6.0 + wave_ultra_slow_cos * 1.0, + 3.5 + wave_ultra_slow_cos * 0.5, + 0.0 + wave_ultra_slow * 1.0, + ); + next.l_hand.ori = Quaternion::rotation_x(-0.3); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new( + -6.0 + wave_ultra_slow_cos * 1.0, + 3.0 + wave_ultra_slow_cos * 0.5, + -2.0 + wave_ultra_slow * 1.0, + ); + next.r_hand.ori = Quaternion::rotation_x(-0.3); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + -6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0, + 4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5, + 0.0 + wave_ultra_slow * 1.0, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.weapon.scale = Vec3::one(); + } else if skeleton_attr.weapon_id == 2.0 { + next.l_hand.offset = Vec3::new( + -6.0 + wave_ultra_slow_cos * 1.0, + 3.5 + wave_ultra_slow_cos * 0.5, + 0.0 + wave_ultra_slow * 1.0, + ); + next.l_hand.ori = Quaternion::rotation_x(-0.3); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new( + -6.0 + wave_ultra_slow_cos * 1.0, + 3.0 + wave_ultra_slow_cos * 0.5, + -2.0 + wave_ultra_slow * 1.0, + ); + next.r_hand.ori = Quaternion::rotation_x(-0.3); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + -6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0, + 4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5, + 0.0 + wave_ultra_slow * 1.0, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.weapon.scale = Vec3::one(); + } else if skeleton_attr.weapon_id == 3.0 { + next.l_hand.offset = Vec3::new(-7.0, 8.25, 2.0); + next.l_hand.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(-1.2) + * Quaternion::rotation_z(wave_ultra_slow * 0.2); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new(7.0, 7.0, -3.0); + next.r_hand.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(-1.2) + * Quaternion::rotation_z(wave_ultra_slow * 0.2); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + 5.0 + skeleton_attr.weapon_x, + 8.75 + skeleton_attr.weapon_y, + -2.5, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(-1.2) + * Quaternion::rotation_z(wave_ultra_slow * 0.2); + next.weapon.scale = Vec3::one(); + } else if skeleton_attr.weapon_id == 4.0 { + next.l_hand.offset = Vec3::new( + -6.0 + wave_ultra_slow_cos * 1.0, + 3.5 + wave_ultra_slow_cos * 0.5, + 0.0 + wave_ultra_slow * 1.0, + ); + next.l_hand.ori = Quaternion::rotation_x(-0.3); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new( + -6.0 + wave_ultra_slow_cos * 1.0, + 3.0 + wave_ultra_slow_cos * 0.5, + -2.0 + wave_ultra_slow * 1.0, + ); + next.r_hand.ori = Quaternion::rotation_x(-0.3); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + -6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0, + 4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5, + 0.0 + wave_ultra_slow * 1.0, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.weapon.scale = Vec3::one(); + } else if skeleton_attr.weapon_id == 5.0 { + next.l_hand.offset = Vec3::new( + -6.0 + wave_ultra_slow_cos * 1.0, + 3.5 + wave_ultra_slow_cos * 0.5, + 0.0 + wave_ultra_slow * 1.0, + ); + next.l_hand.ori = Quaternion::rotation_x(-0.3); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new( + -6.0 + wave_ultra_slow_cos * 1.0, + 3.0 + wave_ultra_slow_cos * 0.5, + -2.0 + wave_ultra_slow * 1.0, + ); + next.r_hand.ori = Quaternion::rotation_x(-0.3); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + -6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0, + 4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5, + 0.0 + wave_ultra_slow * 1.0, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.weapon.scale = Vec3::one(); + } else if skeleton_attr.weapon_id == 6.0 { + next.l_hand.offset = Vec3::new( + -6.0 + wave_ultra_slow_cos * 1.0, + 3.5 + wave_ultra_slow_cos * 0.5, + 0.0 + wave_ultra_slow * 1.0, + ); + next.l_hand.ori = Quaternion::rotation_x(-0.3); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new( + -6.0 + wave_ultra_slow_cos * 1.0, + 3.0 + wave_ultra_slow_cos * 0.5, + -2.0 + wave_ultra_slow * 1.0, + ); + next.r_hand.ori = Quaternion::rotation_x(-0.3); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + -6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0, + 4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5, + 0.0 + wave_ultra_slow * 1.0, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.weapon.scale = Vec3::one(); + } else if skeleton_attr.weapon_id == 7.0 { + next.l_hand.offset = Vec3::new( + -6.0 + wave_ultra_slow_cos * 1.0, + 3.5 + wave_ultra_slow_cos * 0.5, + 0.0 + wave_ultra_slow * 1.0, + ); + next.l_hand.ori = Quaternion::rotation_x(-0.3); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0); + next.r_hand.ori = Quaternion::rotation_x(-0.3); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + -6.0 + skeleton_attr.weapon_x, + 4.5 + skeleton_attr.weapon_y, + 0.0, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.weapon.scale = Vec3::one(); + } next.l_foot.offset = Vec3::new(-3.4, -1.5, 8.0 + wave_slow * 0.2); next.l_foot.ori = Quaternion::rotation_x(wave_ultra_slow_cos * 0.015); next.l_foot.scale = Vec3::one(); diff --git a/voxygen/src/anim/character/cjump.rs b/voxygen/src/anim/character/cjump.rs index 170adcb923..797b8c9c7c 100644 --- a/voxygen/src/anim/character/cjump.rs +++ b/voxygen/src/anim/character/cjump.rs @@ -42,179 +42,127 @@ impl Animation for CjumpAnimation { next.shorts.ori = Quaternion::rotation_z(0.0); next.shorts.scale = Vec3::one(); -if skeleton_attr.weapon_id == 1.0{ - next.l_hand.offset = Vec3::new( - -7.0, - 3.25, - 0.25 + wave_stop * 2.0, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - -7.0, - 3.0, - -2.0 + wave_stop * 2.0, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - -7.0 + skeleton_attr.weapon_x, - 4.0 + skeleton_attr.weapon_y, - 0.0 + wave_stop * 2.0, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.weapon.scale = Vec3::one(); - } -else if skeleton_attr.weapon_id == 2.0{ next.l_hand.offset = Vec3::new( - -6.0, - 3.5, - 0.0, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - -6.0, - 3.0, - -2.0, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - -6.0 + skeleton_attr.weapon_x, - 4.5 + skeleton_attr.weapon_y, - 0.0, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.weapon.scale = Vec3::one(); - } -else if skeleton_attr.weapon_id == 3.0{ next.l_hand.offset = Vec3::new( - -7.0, - 8.25, - 2.0 + wave_stop * 2.0, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3) * Quaternion::rotation_y(-1.2) - * Quaternion::rotation_z(0.0); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - 7.0, - 7.0, - -3.0 + wave_stop * 2.0, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3) * Quaternion::rotation_y(-1.2) - * Quaternion::rotation_z(0.0); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - 5.0 + skeleton_attr.weapon_x, - 8.75 + skeleton_attr.weapon_y, - -2.5 + wave_stop * 2.0, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(-1.2) - * Quaternion::rotation_z(0.0); - next.weapon.scale = Vec3::one(); - } -else if skeleton_attr.weapon_id == 4.0{ next.l_hand.offset = Vec3::new( - -7.0, - 7.5, - 0.0, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3) * Quaternion::rotation_y(-1.7) - * Quaternion::rotation_z(1.0); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - 7.0, - 6.25, - 1.5, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3) * Quaternion::rotation_y(-1.7) - * Quaternion::rotation_z(1.0); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - 5.0 + skeleton_attr.weapon_x, - 8.0 + skeleton_attr.weapon_y, - 1.0, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(-1.7) - * Quaternion::rotation_z(1.0); - next.weapon.scale = Vec3::one(); - } -else if skeleton_attr.weapon_id == 5.0{ next.l_hand.offset = Vec3::new( - -6.0, - 3.5, - 0.0, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - -6.0, - 3.0, - -2.0, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - -6.0 + skeleton_attr.weapon_x, - 4.5 + skeleton_attr.weapon_y, - 0.0, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.weapon.scale = Vec3::one(); - } -else if skeleton_attr.weapon_id == 6.0{ next.l_hand.offset = Vec3::new( - -6.0, - 3.5, - 0.0, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - -6.0, - 3.0, - -2.0, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - -6.0 + skeleton_attr.weapon_x, - 4.5 + skeleton_attr.weapon_y, - 0.0, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.weapon.scale = Vec3::one(); - } -else if skeleton_attr.weapon_id == 7.0{ next.l_hand.offset = Vec3::new( - -6.0, - 3.5, - 0.0, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - -6.0, - 3.0, - -2.0, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - -6.0 + skeleton_attr.weapon_x, - 4.5 + skeleton_attr.weapon_y, - 0.0, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.weapon.scale = Vec3::one(); - } + if skeleton_attr.weapon_id == 1.0 { + next.l_hand.offset = Vec3::new(-7.0, 3.25, 0.25 + wave_stop * 2.0); + next.l_hand.ori = Quaternion::rotation_x(-0.3); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new(-7.0, 3.0, -2.0 + wave_stop * 2.0); + next.r_hand.ori = Quaternion::rotation_x(-0.3); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + -7.0 + skeleton_attr.weapon_x, + 4.0 + skeleton_attr.weapon_y, + 0.0 + wave_stop * 2.0, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.weapon.scale = Vec3::one(); + } else if skeleton_attr.weapon_id == 2.0 { + next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0); + next.l_hand.ori = Quaternion::rotation_x(-0.3); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0); + next.r_hand.ori = Quaternion::rotation_x(-0.3); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + -6.0 + skeleton_attr.weapon_x, + 4.5 + skeleton_attr.weapon_y, + 0.0, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.weapon.scale = Vec3::one(); + } else if skeleton_attr.weapon_id == 3.0 { + next.l_hand.offset = Vec3::new(-7.0, 8.25, 2.0 + wave_stop * 2.0); + next.l_hand.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(-1.2) + * Quaternion::rotation_z(0.0); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new(7.0, 7.0, -3.0 + wave_stop * 2.0); + next.r_hand.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(-1.2) + * Quaternion::rotation_z(0.0); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + 5.0 + skeleton_attr.weapon_x, + 8.75 + skeleton_attr.weapon_y, + -2.5 + wave_stop * 2.0, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(-1.2) + * Quaternion::rotation_z(0.0); + next.weapon.scale = Vec3::one(); + } else if skeleton_attr.weapon_id == 4.0 { + next.l_hand.offset = Vec3::new(-7.0, 7.5, 0.0); + next.l_hand.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(-1.7) + * Quaternion::rotation_z(1.0); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new(7.0, 6.25, 1.5); + next.r_hand.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(-1.7) + * Quaternion::rotation_z(1.0); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + 5.0 + skeleton_attr.weapon_x, + 8.0 + skeleton_attr.weapon_y, + 1.0, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(-1.7) + * Quaternion::rotation_z(1.0); + next.weapon.scale = Vec3::one(); + } else if skeleton_attr.weapon_id == 5.0 { + next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0); + next.l_hand.ori = Quaternion::rotation_x(-0.3); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0); + next.r_hand.ori = Quaternion::rotation_x(-0.3); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + -6.0 + skeleton_attr.weapon_x, + 4.5 + skeleton_attr.weapon_y, + 0.0, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.weapon.scale = Vec3::one(); + } else if skeleton_attr.weapon_id == 6.0 { + next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0); + next.l_hand.ori = Quaternion::rotation_x(-0.3); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0); + next.r_hand.ori = Quaternion::rotation_x(-0.3); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + -6.0 + skeleton_attr.weapon_x, + 4.5 + skeleton_attr.weapon_y, + 0.0, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.weapon.scale = Vec3::one(); + } else if skeleton_attr.weapon_id == 7.0 { + next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0); + next.l_hand.ori = Quaternion::rotation_x(-0.3); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0); + next.r_hand.ori = Quaternion::rotation_x(-0.3); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + -6.0 + skeleton_attr.weapon_x, + 4.5 + skeleton_attr.weapon_y, + 0.0, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.weapon.scale = Vec3::one(); + } next.l_foot.offset = Vec3::new(-3.4, 1.0, 6.0); next.l_foot.ori = Quaternion::rotation_x(wave_stop * -1.2 - wave_slow * 0.2); diff --git a/voxygen/src/anim/character/crun.rs b/voxygen/src/anim/character/crun.rs index a8925a4087..88421bc458 100644 --- a/voxygen/src/anim/character/crun.rs +++ b/voxygen/src/anim/character/crun.rs @@ -60,178 +60,123 @@ impl Animation for CrunAnimation { next.shorts.ori = Quaternion::rotation_z(wave * 0.6); next.shorts.scale = Vec3::one(); - -if skeleton_attr.weapon_id == 1.0{ - next.l_hand.offset = Vec3::new( - -6.0, - 3.75, - 0.25, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - -6.0, - 3.0, - -2.0, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - -6.0 + skeleton_attr.weapon_x, - 4.0 + skeleton_attr.weapon_y, - 0.0, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.weapon.scale = Vec3::one(); - } -else if skeleton_attr.weapon_id == 2.0{ next.l_hand.offset = Vec3::new( - -6.0, - 3.5, - 0.0, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - -6.0, - 3.0, - -2.0, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - -6.0 + skeleton_attr.weapon_x, - 4.5 + skeleton_attr.weapon_y, - 0.0, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.weapon.scale = Vec3::one(); - } -else if skeleton_attr.weapon_id == 3.0{ next.l_hand.offset = Vec3::new( - -7.0, - 8.25, - 3.0, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3) * Quaternion::rotation_y(-1.2) - * Quaternion::rotation_z(wave * -0.25); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - 7.0, - 7.0, - -1.5, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3) * Quaternion::rotation_y(-1.2) - * Quaternion::rotation_z(wave * -0.25); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - 5.0 + skeleton_attr.weapon_x, - 8.75 + skeleton_attr.weapon_y, - -2.0, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(-1.2) - * Quaternion::rotation_z(wave * -0.25); - next.weapon.scale = Vec3::one(); - } -else if skeleton_attr.weapon_id == 4.0{ next.l_hand.offset = Vec3::new( - -6.0, - 3.5, - 0.0, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - -6.0, - 3.0, - -2.0, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - -6.0 + skeleton_attr.weapon_x, - 4.5 + skeleton_attr.weapon_y, - 0.0, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.weapon.scale = Vec3::one(); - } -else if skeleton_attr.weapon_id == 5.0{ next.l_hand.offset = Vec3::new( - -6.0, - 3.5, - 0.0, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - -6.0, - 3.0, - -2.0, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - -6.0 + skeleton_attr.weapon_x, - 4.5 + skeleton_attr.weapon_y, - 0.0, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.weapon.scale = Vec3::one(); - } -else if skeleton_attr.weapon_id == 6.0{ next.l_hand.offset = Vec3::new( - -6.0, - 3.5, - 0.0, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - -6.0, - 3.0, - -2.0, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - -6.0 + skeleton_attr.weapon_x, - 4.5 + skeleton_attr.weapon_y, - 0.0, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.weapon.scale = Vec3::one(); - } -else if skeleton_attr.weapon_id == 7.0{ next.l_hand.offset = Vec3::new( - -6.0, - 3.5, - 0.0, - ); - next.l_hand.ori = Quaternion::rotation_x(-0.3); - next.l_hand.scale = Vec3::one() * 1.01; - next.r_hand.offset = Vec3::new( - -6.0, - 3.0, - -2.0, - ); - next.r_hand.ori = Quaternion::rotation_x(-0.3); - next.r_hand.scale = Vec3::one() * 1.01; - next.weapon.offset = Vec3::new( - -6.0 + skeleton_attr.weapon_x, - 4.5 + skeleton_attr.weapon_y, - 0.0, - ); - next.weapon.ori = Quaternion::rotation_x(-0.3) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.weapon.scale = Vec3::one(); - } + if skeleton_attr.weapon_id == 1.0 { + next.l_hand.offset = Vec3::new(-6.0, 3.75, 0.25); + next.l_hand.ori = Quaternion::rotation_x(-0.3); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0); + next.r_hand.ori = Quaternion::rotation_x(-0.3); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + -6.0 + skeleton_attr.weapon_x, + 4.0 + skeleton_attr.weapon_y, + 0.0, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.weapon.scale = Vec3::one(); + } else if skeleton_attr.weapon_id == 2.0 { + next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0); + next.l_hand.ori = Quaternion::rotation_x(-0.3); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0); + next.r_hand.ori = Quaternion::rotation_x(-0.3); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + -6.0 + skeleton_attr.weapon_x, + 4.5 + skeleton_attr.weapon_y, + 0.0, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.weapon.scale = Vec3::one(); + } else if skeleton_attr.weapon_id == 3.0 { + next.l_hand.offset = Vec3::new(-7.0, 8.25, 3.0); + next.l_hand.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(-1.2) + * Quaternion::rotation_z(wave * -0.25); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new(7.0, 7.0, -1.5); + next.r_hand.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(-1.2) + * Quaternion::rotation_z(wave * -0.25); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + 5.0 + skeleton_attr.weapon_x, + 8.75 + skeleton_attr.weapon_y, + -2.0, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(-1.2) + * Quaternion::rotation_z(wave * -0.25); + next.weapon.scale = Vec3::one(); + } else if skeleton_attr.weapon_id == 4.0 { + next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0); + next.l_hand.ori = Quaternion::rotation_x(-0.3); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0); + next.r_hand.ori = Quaternion::rotation_x(-0.3); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + -6.0 + skeleton_attr.weapon_x, + 4.5 + skeleton_attr.weapon_y, + 0.0, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.weapon.scale = Vec3::one(); + } else if skeleton_attr.weapon_id == 5.0 { + next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0); + next.l_hand.ori = Quaternion::rotation_x(-0.3); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0); + next.r_hand.ori = Quaternion::rotation_x(-0.3); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + -6.0 + skeleton_attr.weapon_x, + 4.5 + skeleton_attr.weapon_y, + 0.0, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.weapon.scale = Vec3::one(); + } else if skeleton_attr.weapon_id == 6.0 { + next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0); + next.l_hand.ori = Quaternion::rotation_x(-0.3); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0); + next.r_hand.ori = Quaternion::rotation_x(-0.3); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + -6.0 + skeleton_attr.weapon_x, + 4.5 + skeleton_attr.weapon_y, + 0.0, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.weapon.scale = Vec3::one(); + } else if skeleton_attr.weapon_id == 7.0 { + next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0); + next.l_hand.ori = Quaternion::rotation_x(-0.3); + next.l_hand.scale = Vec3::one() * 1.01; + next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0); + next.r_hand.ori = Quaternion::rotation_x(-0.3); + next.r_hand.scale = Vec3::one() * 1.01; + next.weapon.offset = Vec3::new( + -6.0 + skeleton_attr.weapon_x, + 4.5 + skeleton_attr.weapon_y, + 0.0, + ); + next.weapon.ori = Quaternion::rotation_x(-0.3) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.weapon.scale = Vec3::one(); + } next.l_foot.offset = Vec3::new(-3.4, 0.0 + wave_cos * 1.0, 6.0 - wave_cos_dub * 0.11); next.l_foot.ori = Quaternion::rotation_x(-0.0 - wave_cos * 1.5); next.l_foot.scale = Vec3::one(); diff --git a/voxygen/src/anim/mod.rs b/voxygen/src/anim/mod.rs index 6674d28d85..a699f300df 100644 --- a/voxygen/src/anim/mod.rs +++ b/voxygen/src/anim/mod.rs @@ -175,8 +175,6 @@ impl<'a> From<&'a comp::humanoid::Body> for SkeletonAttr { Weapon::Staff => 5.0, Weapon::Bow => 6.0, Weapon::Daggers => 7.0, - - }, } }