diff --git a/assets/common/abilities/axesimple/dash.ron b/assets/common/abilities/axesimple/dash.ron index b034b17b0c..425bb21a9e 100644 --- a/assets/common/abilities/axesimple/dash.ron +++ b/assets/common/abilities/axesimple/dash.ron @@ -6,7 +6,7 @@ DashMelee( scaled_poise_damage: 0, base_knockback: 8.0, scaled_knockback: 7.0, - range: 3.0, + range: 2.0, angle: 15.0, energy_drain: 0, forward_speed: 3.0, diff --git a/assets/common/abilities/staff/fireshockwave.ron b/assets/common/abilities/staff/fireshockwave.ron index 962c821700..e7e1f67a0f 100644 --- a/assets/common/abilities/staff/fireshockwave.ron +++ b/assets/common/abilities/staff/fireshockwave.ron @@ -2,7 +2,7 @@ Shockwave( energy_cost: 600, buildup_duration: 0.7, swing_duration: 0.1, - recover_duration: 0.3, + recover_duration: 0.2, damage: 200, poise_damage: 0, knockback: ( strength: 25.0, direction: Away), diff --git a/assets/common/abilities/unique/stonegolemfist/shockwave.ron b/assets/common/abilities/unique/stonegolemfist/shockwave.ron index e17d266d1a..d6f315fdab 100644 --- a/assets/common/abilities/unique/stonegolemfist/shockwave.ron +++ b/assets/common/abilities/unique/stonegolemfist/shockwave.ron @@ -1,14 +1,14 @@ Shockwave( energy_cost: 0, - buildup_duration: 0.5, - swing_duration: 0.2, - recover_duration: 0.8, + buildup_duration: 1.5, + swing_duration: 0.15, + recover_duration: 1.8, damage: 500, poise_damage: 0, knockback: (strength: 40.0, direction: TowardsUp), - shockwave_angle: 90.0, + shockwave_angle: 100.0, shockwave_vertical_angle: 90.0, - shockwave_speed: 50.0, + shockwave_speed: 65.0, shockwave_duration: 1.0, requires_ground: true, move_efficiency: 0.05, diff --git a/assets/voxygen/voxel/biped_small_weapon_manifest.ron b/assets/voxygen/voxel/biped_small_weapon_manifest.ron index 6343b4d50f..a2ab75963e 100644 --- a/assets/voxygen/voxel/biped_small_weapon_manifest.ron +++ b/assets/voxygen/voxel/biped_small_weapon_manifest.ron @@ -1,18 +1,62 @@ ({ - "common.items.npc_weapons.spear.wooden_spear": ( - vox_spec: ("weapon.spear.sahagin", (-1.5, -3.0, -5.0)), + "common.items.npc_weapons.biped_small.adlet.adlet_bow": ( + vox_spec: ("weapon.biped_small.bow.adlet", (-1.5, -3.0, -5.0)), color: None ), - "common.items.weapon.spear.adlet": ( - vox_spec: ("weapon.spear.adlet", (-0.5, -3.0, -5.0)), + "common.items.npc_weapons.biped_small.adlet.gnoll_staff": ( + vox_spec: ("weapon.biped_small.staff.sahagin", (-0.5, -4.0, -4.0)), color: None ), - "common.items.npc_weapons.bow.adlet": ( - vox_spec: ("weapon.bow.adlet", (-0.5, -5.5, -9.5)), + "common.items.npc_weapons.biped_small.adlet.wooden_spear": ( + vox_spec: ("weapon.biped_small.spear.adlet", (-0.5, -3.0, -4.0)), color: None ), - "common.items.npc_weapons.staff.gnoll": ( - vox_spec: ("weapon.staff.gnoll", (-2.5, -3.0, -4.0)), + "common.items.npc_weapons.biped_small.gnarling.adlet_bow": ( + vox_spec: ("weapon.biped_small.bow.adlet", (-1.5, -3.0, -5.0)), + color: None + ), + "common.items.npc_weapons.biped_small.gnarling.gnoll_staff": ( + vox_spec: ("weapon.biped_small.staff.sahagin", (-0.5, -4.0, -4.0)), + color: None + ), + "common.items.npc_weapons.biped_small.gnarling.wooden_spear": ( + vox_spec: ("weapon.biped_small.spear.adlet", (-0.5, -3.0, -4.0)), + color: None + ), + "common.items.npc_weapons.biped_small.sahagin.adlet_bow": ( + vox_spec: ("weapon.biped_small.bow.sahagin", (-0.5, -5.5, -9.5)), + color: None + ), + "common.items.npc_weapons.biped_small.sahagin.gnoll_staff": ( + vox_spec: ("weapon.biped_small.staff.sahagin", (-0.5, -4.0, -4.0)), + color: None + ), + "common.items.npc_weapons.biped_small.sahagin.wooden_spear": ( + vox_spec: ("weapon.biped_small.spear.sahagin", (-0.5, -3.0, -4.0)), + color: None + ), + "common.items.npc_weapons.biped_small.haniwa.adlet_bow": ( + vox_spec: ("weapon.biped_small.bow.haniwa", (-0.5, -4.5, -10.5)), + color: None + ), + "common.items.npc_weapons.biped_small.haniwa.gnoll_staff": ( + vox_spec: ("weapon.biped_small.staff.sahagin", (-0.5, -4.0, -4.0)), + color: None + ), + "common.items.npc_weapons.biped_small.haniwa.wooden_spear": ( + vox_spec: ("weapon.biped_small.spear.haniwa", (-0.5, -3.0, -4.0)), + color: None + ), + "common.items.npc_weapons.biped_small.myrmidon.adlet_bow": ( + vox_spec: ("weapon.biped_small.bow.myrmidon", (-0.5, -5.0, -10.5)), + color: None + ), + "common.items.npc_weapons.biped_small.myrmidon.gnoll_staff": ( + vox_spec: ("weapon.biped_small.staff.sahagin", (-0.5, -4.0, -4.0)), + color: None + ), + "common.items.npc_weapons.biped_small.myrmidon.wooden_spear": ( + vox_spec: ("weapon.biped_small.spear.myrmidon", (-0.5, -2.0, -4.0)), color: None ), }) diff --git a/assets/voxygen/voxel/biped_weapon_manifest.ron b/assets/voxygen/voxel/biped_weapon_manifest.ron index abdf5c61b2..0be85c1c27 100644 --- a/assets/voxygen/voxel/biped_weapon_manifest.ron +++ b/assets/voxygen/voxel/biped_weapon_manifest.ron @@ -758,69 +758,69 @@ vox_spec: ("weapon.axe.minotaur_axe", (-2.5, -9.0, -6.0)), color: None ), - //BIPEDSMALL - "common.items.npc_weapons.biped_small.gnarling.wooden_spear": ( - vox_spec: ("weapon.spear.sahagin", (-1.5, -3.0, -5.0)), - color: None - ), - "common.items.npc_weapons.biped_small.gnarling.adlet_bow": ( - vox_spec: ("weapon.bow.adlet", (-0.5, -5.5, -9.5)), - color: None - ), - "common.items.npc_weapons.biped_small.gnarling.gnoll_staff": ( - vox_spec: ("weapon.staff.gnoll", (-2.5, -3.0, -4.0)), - color: None - ), - "common.items.npc_weapons.biped_small.adlet.wooden_spear": ( - vox_spec: ("weapon.spear.sahagin", (-1.5, -3.0, -5.0)), - color: None - ), - "common.items.npc_weapons.biped_small.adlet.adlet_bow": ( - vox_spec: ("weapon.bow.adlet", (-0.5, -5.5, -9.5)), - color: None - ), - "common.items.npc_weapons.biped_small.adlet.gnoll_staff": ( - vox_spec: ("weapon.staff.gnoll", (-2.5, -3.0, -4.0)), - color: None - ), - "common.items.npc_weapons.biped_small.sahagin.wooden_spear": ( - vox_spec: ("weapon.spear.sahagin", (-1.5, -3.0, -5.0)), - color: None - ), - "common.items.npc_weapons.biped_small.sahagin.adlet_bow": ( - vox_spec: ("weapon.bow.adlet", (-0.5, -5.5, -9.5)), - color: None - ), - "common.items.npc_weapons.biped_small.sahagin.gnoll_staff": ( - vox_spec: ("weapon.staff.gnoll", (-2.5, -3.0, -4.0)), - color: None - ), - "common.items.npc_weapons.biped_small.haniwa.wooden_spear": ( - vox_spec: ("weapon.spear.sahagin", (-1.5, -3.0, -5.0)), - color: None - ), - "common.items.npc_weapons.biped_small.haniwa.adlet_bow": ( - vox_spec: ("weapon.bow.adlet", (-0.5, -5.5, -9.5)), - color: None - ), - "common.items.npc_weapons.biped_small.haniwa.gnoll_staff": ( - vox_spec: ("weapon.staff.gnoll", (-2.5, -3.0, -4.0)), - color: None - ), - "common.items.npc_weapons.biped_small.myrmidon.wooden_spear": ( - vox_spec: ("weapon.spear.sahagin", (-1.5, -3.0, -5.0)), - color: None - ), - "common.items.npc_weapons.biped_small.myrmidon.adlet_bow": ( - vox_spec: ("weapon.bow.adlet", (-0.5, -5.5, -9.5)), - color: None - ), - "common.items.npc_weapons.biped_small.myrmidon.gnoll_staff": ( - vox_spec: ("weapon.staff.gnoll", (-2.5, -3.0, -4.0)), - color: None - ), "common.items.npc_weapons.hammer.yeti_hammer": ( vox_spec: ("weapon.hammer.2hhammer_yeti", (-7.5, -7.0, -7.0)), color: None ), + //BIPEDSMALL + "common.items.npc_weapons.biped_small.adlet.adlet_bow": ( + vox_spec: ("weapon.biped_small.bow.adlet", (-1.5, -3.0, -5.0)), + color: None + ), + "common.items.npc_weapons.biped_small.adlet.gnoll_staff": ( + vox_spec: ("weapon.biped_small.staff.sahagin", (-0.5, -4.0, -4.0)), + color: None + ), + "common.items.npc_weapons.biped_small.adlet.wooden_spear": ( + vox_spec: ("weapon.biped_small.spear.adlet", (-0.5, -3.0, -4.0)), + color: None + ), + "common.items.npc_weapons.biped_small.gnarling.adlet_bow": ( + vox_spec: ("weapon.biped_small.bow.adlet", (-1.5, -3.0, -5.0)), + color: None + ), + "common.items.npc_weapons.biped_small.gnarling.gnoll_staff": ( + vox_spec: ("weapon.biped_small.staff.sahagin", (-0.5, -4.0, -4.0)), + color: None + ), + "common.items.npc_weapons.biped_small.gnarling.wooden_spear": ( + vox_spec: ("weapon.biped_small.spear.adlet", (-0.5, -3.0, -4.0)), + color: None + ), + "common.items.npc_weapons.biped_small.sahagin.adlet_bow": ( + vox_spec: ("weapon.biped_small.bow.sahagin", (-0.5, -5.5, -9.5)), + color: None + ), + "common.items.npc_weapons.biped_small.sahagin.gnoll_staff": ( + vox_spec: ("weapon.biped_small.staff.sahagin", (-0.5, -4.0, -4.0)), + color: None + ), + "common.items.npc_weapons.biped_small.sahagin.wooden_spear": ( + vox_spec: ("weapon.biped_small.spear.sahagin", (-0.5, -3.0, -4.0)), + color: None + ), + "common.items.npc_weapons.biped_small.haniwa.adlet_bow": ( + vox_spec: ("weapon.biped_small.bow.haniwa", (-0.5, -4.5, -10.5)), + color: None + ), + "common.items.npc_weapons.biped_small.haniwa.gnoll_staff": ( + vox_spec: ("weapon.biped_small.staff.sahagin", (-0.5, -4.0, -4.0)), + color: None + ), + "common.items.npc_weapons.biped_small.haniwa.wooden_spear": ( + vox_spec: ("weapon.biped_small.spear.haniwa", (-0.5, -3.0, -4.0)), + color: None + ), + "common.items.npc_weapons.biped_small.myrmidon.adlet_bow": ( + vox_spec: ("weapon.biped_small.bow.myrmidon", (-0.5, -5.0, -10.5)), + color: None + ), + "common.items.npc_weapons.biped_small.myrmidon.gnoll_staff": ( + vox_spec: ("weapon.biped_small.staff.sahagin", (-0.5, -4.0, -4.0)), + color: None + ), + "common.items.npc_weapons.biped_small.myrmidon.wooden_spear": ( + vox_spec: ("weapon.biped_small.spear.myrmidon", (-0.5, -2.0, -4.0)), + color: None + ), }) diff --git a/assets/voxygen/voxel/weapon/bow/adlet.vox b/assets/voxygen/voxel/weapon/biped_small/bow/adlet.vox similarity index 100% rename from assets/voxygen/voxel/weapon/bow/adlet.vox rename to assets/voxygen/voxel/weapon/biped_small/bow/adlet.vox diff --git a/assets/voxygen/voxel/weapon/biped_small/bow/haniwa.vox b/assets/voxygen/voxel/weapon/biped_small/bow/haniwa.vox new file mode 100644 index 0000000000..ab4eb277cf --- /dev/null +++ b/assets/voxygen/voxel/weapon/biped_small/bow/haniwa.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:efd4f043a8d15c315102bac1a7266a403cd692390d0ca1214eeedbf7791e5fab +size 1392 diff --git a/assets/voxygen/voxel/weapon/biped_small/bow/myrmidon.vox b/assets/voxygen/voxel/weapon/biped_small/bow/myrmidon.vox new file mode 100644 index 0000000000..f745ea163f --- /dev/null +++ b/assets/voxygen/voxel/weapon/biped_small/bow/myrmidon.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:deae7f15861e22ae34e05b1a0f9827dcdac4eab0e776add388abab489bf4187e +size 1372 diff --git a/assets/voxygen/voxel/weapon/biped_small/bow/sahagin.vox b/assets/voxygen/voxel/weapon/biped_small/bow/sahagin.vox new file mode 100644 index 0000000000..fbfc69f519 --- /dev/null +++ b/assets/voxygen/voxel/weapon/biped_small/bow/sahagin.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fb76f44481d3dbecbbd2a9c74e98850699368e58807e1fbe2f9e67c921a8c9b +size 1356 diff --git a/assets/voxygen/voxel/weapon/spear/adlet.vox b/assets/voxygen/voxel/weapon/biped_small/spear/adlet.vox similarity index 100% rename from assets/voxygen/voxel/weapon/spear/adlet.vox rename to assets/voxygen/voxel/weapon/biped_small/spear/adlet.vox diff --git a/assets/voxygen/voxel/weapon/biped_small/spear/haniwa.vox b/assets/voxygen/voxel/weapon/biped_small/spear/haniwa.vox new file mode 100644 index 0000000000..5a304c7947 --- /dev/null +++ b/assets/voxygen/voxel/weapon/biped_small/spear/haniwa.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6dbd0b99fee569fd7d8226db102143fa3e6477a2144741540435d0ac74db974 +size 1352 diff --git a/assets/voxygen/voxel/weapon/biped_small/spear/myrmidon.vox b/assets/voxygen/voxel/weapon/biped_small/spear/myrmidon.vox new file mode 100644 index 0000000000..f33aa0ef48 --- /dev/null +++ b/assets/voxygen/voxel/weapon/biped_small/spear/myrmidon.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3c906a2c6240593003108d6594ec6c3c564bb198009954a840b168518eb5380 +size 1340 diff --git a/assets/voxygen/voxel/weapon/spear/sahagin.vox b/assets/voxygen/voxel/weapon/biped_small/spear/sahagin.vox similarity index 100% rename from assets/voxygen/voxel/weapon/spear/sahagin.vox rename to assets/voxygen/voxel/weapon/biped_small/spear/sahagin.vox diff --git a/assets/voxygen/voxel/weapon/staff/gnoll.vox b/assets/voxygen/voxel/weapon/biped_small/staff/gnoll.vox similarity index 100% rename from assets/voxygen/voxel/weapon/staff/gnoll.vox rename to assets/voxygen/voxel/weapon/biped_small/staff/gnoll.vox diff --git a/assets/voxygen/voxel/weapon/biped_small/staff/sahagin.vox b/assets/voxygen/voxel/weapon/biped_small/staff/sahagin.vox new file mode 100644 index 0000000000..ea9227af42 --- /dev/null +++ b/assets/voxygen/voxel/weapon/biped_small/staff/sahagin.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:148e3b6c9f16281d557663304e921b86ae9699917b163798b48f8bf5d2c6dc88 +size 1332 diff --git a/common/src/states/shockwave.rs b/common/src/states/shockwave.rs index 42d80b0216..8cf88ef4e6 100644 --- a/common/src/states/shockwave.rs +++ b/common/src/states/shockwave.rs @@ -147,7 +147,7 @@ impl CharacterBehavior for Data { } }, StageSection::Recover => { - if self.timer < self.static_data.swing_duration { + if self.timer < self.static_data.recover_duration { // Recovers update.character = CharacterState::Shockwave(Data { timer: self diff --git a/common/src/states/utils.rs b/common/src/states/utils.rs index 532668e59b..6223f5ebc6 100644 --- a/common/src/states/utils.rs +++ b/common/src/states/utils.rs @@ -3,7 +3,7 @@ use crate::{ biped_large, biped_small, inventory::slot::EquipSlot, item::{Hands, ItemKind, Tool, ToolKind}, - quadruped_low, quadruped_medium, + quadruped_low, quadruped_medium, quadruped_small, skills::Skill, theropod, Body, CharacterAbility, CharacterState, LoadoutManip, StateUpdate, }, @@ -38,7 +38,16 @@ impl Body { pub fn base_accel(&self) -> f32 { match self { Body::Humanoid(_) => 100.0, - Body::QuadrupedSmall(_) => 125.0, + Body::QuadrupedSmall(body) => match body.species { + quadruped_small::Species::Turtle => 30.0, + quadruped_small::Species::Axolotl => 70.0, + quadruped_small::Species::Pig => 70.0, + quadruped_small::Species::Sheep => 70.0, + quadruped_small::Species::Cat => 70.0, + quadruped_small::Species::Truffler => 70.0, + quadruped_small::Species::Fungome => 70.0, + _ => 125.0, + }, Body::QuadrupedMedium(quadruped_medium) => match quadruped_medium.species { quadruped_medium::Species::Grolgar => 110.0, quadruped_medium::Species::Saber => 180.0, diff --git a/voxygen/anim/src/biped_large/dash.rs b/voxygen/anim/src/biped_large/dash.rs index 7c7ba9b28c..4de15fdb23 100644 --- a/voxygen/anim/src/biped_large/dash.rs +++ b/voxygen/anim/src/biped_large/dash.rs @@ -111,32 +111,32 @@ impl Animation for DashAnimation { * Quaternion::rotation_z(-move3 * -1.5); }, Some(ToolKind::AxeSimple) => { - next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move3 * -10.0); + next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move3 * 3.0); next.control_r.position = Vec3::new(1.0, 2.0, -2.0); next.control.position = Vec3::new( - 4.0 + move1 * -3.0 + move3 * -8.0, - (s_a.grip / 1.0) + move1 * -1.0 + move3 * 12.0, - (-s_a.grip / 0.8) + move1 * 2.0 + move3 * -6.0, + 4.0 + move1 * -3.0 + move3 * -5.0, + (s_a.grip / 1.0) + move1 * -1.0 + move3 * 1.0 + footrotl * 2.0, + (-s_a.grip / 0.8) + move1 * 2.0 + move3 * -3.0, ); next.head.orientation = Quaternion::rotation_x(move1 * -0.5 + move3 * 0.5) * Quaternion::rotation_z(move1 * 0.3 + move3 * 0.3); next.upper_torso.orientation = Quaternion::rotation_x(move1 * -0.4 + move3 * 0.9) * Quaternion::rotation_z(move1 * 0.6 + move3 * -1.5); next.lower_torso.orientation = Quaternion::rotation_y(move1 * -0.2 + move3 * -0.1) - * Quaternion::rotation_x(move1 * 0.4 + move3 * -0.7) + * Quaternion::rotation_x(move1 * 0.4 + move3 * -0.7 + footrotr * 0.1) * Quaternion::rotation_z(move1 * -0.6 + move3 * 1.6); - next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move3 * 0.8) + next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move3 * 0.3) * Quaternion::rotation_y(move1 * 0.7); - next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move3 * 0.8) + next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move3 * -0.2) * Quaternion::rotation_y(0.0) * Quaternion::rotation_z(0.0); next.control.orientation = - Quaternion::rotation_x(-1.0 + move1 * -0.2 + move3 * -1.1) - * Quaternion::rotation_y(-1.8 + move1 * -0.2 + move3 * 1.5) - * Quaternion::rotation_z(move1 * -0.8 + move3 * -1.5); + Quaternion::rotation_x(-1.0 + move1 * -0.2 + move3 * -0.2) + * Quaternion::rotation_y(-1.8 + move1 * -0.2 + move3 * -0.2) + * Quaternion::rotation_z(move1 * -0.8 + move3 * -0.1); }, _ => {}, } diff --git a/voxygen/anim/src/golem/idle.rs b/voxygen/anim/src/golem/idle.rs index 5f8744a771..98d2d82ce3 100644 --- a/voxygen/anim/src/golem/idle.rs +++ b/voxygen/anim/src/golem/idle.rs @@ -57,38 +57,31 @@ impl Animation for IdleAnimation { next.upper_torso.position = Vec3::new(0.0, s_a.upper_torso.0, s_a.upper_torso.1 + breathe * 0.5) * s_a.scaler / 8.0; - next.upper_torso.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.lower_torso.position = Vec3::new(0.0, s_a.lower_torso.0, s_a.lower_torso.1 + breathe * -0.2); - next.lower_torso.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.shoulder_l.position = Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2); - next.shoulder_l.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(-0.2); + next.shoulder_l.orientation = Quaternion::rotation_x(-0.2); next.shoulder_r.position = Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2); - next.shoulder_r.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(-0.2); + next.shoulder_r.orientation = Quaternion::rotation_x(-0.2); next.hand_l.position = Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2 + breathe * 0.6); - next.hand_l.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.2); + next.hand_l.orientation = Quaternion::rotation_x(0.2); next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2 + breathe * 0.6); - next.hand_r.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.2); + next.hand_r.orientation = Quaternion::rotation_x(0.2); next.leg_l.position = Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2 + breathe * -0.2) * 1.02; - next.leg_l.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.leg_r.position = Vec3::new(s_a.leg.0, s_a.leg.1, s_a.leg.2 + breathe * -0.2) * 1.02; - next.leg_r.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.foot_l.position = Vec3::new(-s_a.foot.0, s_a.foot.1, s_a.foot.2 + breathe * -0.2); - next.foot_l.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.foot_r.position = Vec3::new(s_a.foot.0, s_a.foot.1, s_a.foot.2 + breathe * -0.2); - next.foot_r.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.torso.position = Vec3::new(0.0, 0.0, 0.0); - next.torso.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next } } diff --git a/voxygen/anim/src/golem/run.rs b/voxygen/anim/src/golem/run.rs index 1bd3c46881..7c584c8dc6 100644 --- a/voxygen/anim/src/golem/run.rs +++ b/voxygen/anim/src/golem/run.rs @@ -92,22 +92,22 @@ impl Animation for RunAnimation { next.shoulder_l.position = Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2); next.shoulder_l.orientation = Quaternion::rotation_z(footrotl * 0.07) * Quaternion::rotation_y(0.15) - * Quaternion::rotation_x(footrotl * -0.25); + * Quaternion::rotation_x(-0.2 + footrotl * -0.25); next.shoulder_r.position = Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2); next.shoulder_r.orientation = Quaternion::rotation_z(footrotr * -0.07) * Quaternion::rotation_y(-0.15 * speednorm) - * Quaternion::rotation_x(footrotr * -0.25); + * Quaternion::rotation_x(-0.2 + footrotr * -0.25); next.hand_l.position = Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2); next.hand_l.orientation = Quaternion::rotation_x(0.3 + footrotl * -0.06) - * Quaternion::rotation_y(0.1) - * Quaternion::rotation_z(-0.35 + footrotl * -0.1); + * Quaternion::rotation_y(0.1 * speednorm) + * Quaternion::rotation_z(-0.35 * speednorm + footrotl * -0.1); next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2); next.hand_r.orientation = Quaternion::rotation_x(0.3 + footrotr * -0.06) - * Quaternion::rotation_y(-0.1) - * Quaternion::rotation_z(0.35 + footrotr * 0.1); + * Quaternion::rotation_y(-0.1 * speednorm) + * Quaternion::rotation_z(0.35 * speednorm + footrotr * 0.1); next.leg_l.position = Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2) * 1.02; next.leg_l.orientation = Quaternion::rotation_x(footrotl * 0.3) diff --git a/voxygen/anim/src/golem/shockwave.rs b/voxygen/anim/src/golem/shockwave.rs index eda067608a..5f5ef09bee 100644 --- a/voxygen/anim/src/golem/shockwave.rs +++ b/voxygen/anim/src/golem/shockwave.rs @@ -2,12 +2,13 @@ use super::{ super::{vek::*, Animation}, GolemSkeleton, SkeletonAttr, }; +use common::states::utils::StageSection; use std::f32::consts::PI; pub struct ShockwaveAnimation; impl Animation for ShockwaveAnimation { - type Dependency = (f32, f64); + type Dependency = (Option, f32, f64); type Skeleton = GolemSkeleton; #[cfg(feature = "use-dyn-lib")] @@ -17,86 +18,61 @@ impl Animation for ShockwaveAnimation { fn update_skeleton_inner( skeleton: &Self::Skeleton, - (velocity, _global_time): Self::Dependency, + (stage_section, velocity, _global_time): Self::Dependency, anim_time: f64, _rate: &mut f32, s_a: &SkeletonAttr, ) -> Self::Skeleton { let mut next = (*skeleton).clone(); - let lab = 1.0; - let breathe = (anim_time as f32 * lab as f32 + 1.5 * PI).sin(); - let twist = anim_time as f32 * lab as f32 * 2.5; + let (move1base, move2base, move3) = match stage_section { + Some(StageSection::Buildup) => (anim_time as f32, 0.0, 0.0), + Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0), + Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powf(2.0)), + _ => (0.0, 0.0, 0.0), + }; + + let pullback = 1.0 - move3; + let move1 = move1base * pullback; + let move2 = move2base * pullback; - let slower = (((1.0) - / (0.00001 - + 0.9999 * ((anim_time as f32 * lab as f32 * 2.0 - 0.5 * PI).sin()).powi(2))) - .sqrt()) - * ((anim_time as f32 * lab as f32 * 2.0 - 0.5 * PI).sin()) - + 1.0; next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1) * 1.02; - next.head.orientation = - Quaternion::rotation_z((-twist * 2.0).max(-PI)) * Quaternion::rotation_x(0.0); + next.head.orientation = Quaternion::rotation_z(move1 * -PI); - next.upper_torso.position = Vec3::new( - 0.0, - s_a.upper_torso.0, - s_a.upper_torso.1 + slower * -3.0 + breathe * 1.0, - ) * s_a.scaler - / 8.0; - next.upper_torso.orientation = - Quaternion::rotation_z((twist * 2.0).min(PI)) * Quaternion::rotation_x(0.0); + next.upper_torso.position = + Vec3::new(0.0, s_a.upper_torso.0, s_a.upper_torso.1 + move2 * -5.0) * s_a.scaler / 8.0; + next.upper_torso.orientation = Quaternion::rotation_z(move1 * -PI); next.lower_torso.position = - Vec3::new(0.0, s_a.lower_torso.0, s_a.lower_torso.1 + slower * 1.0); - next.lower_torso.orientation = - Quaternion::rotation_z((-twist * 2.0).max(-PI)) * Quaternion::rotation_x(0.0); + Vec3::new(0.0, s_a.lower_torso.0, s_a.lower_torso.1 + move2 * 2.0); + next.lower_torso.orientation = Quaternion::rotation_z(move1 * PI); next.shoulder_l.position = Vec3::new( -s_a.shoulder.0 - 2.0, s_a.shoulder.1, - s_a.shoulder.2 - slower * 1.0, + s_a.shoulder.2 + move2 * -1.0, ); - next.shoulder_l.orientation = Quaternion::rotation_y(0.6 + slower * -0.3); + next.shoulder_l.orientation = Quaternion::rotation_y(move1 * 1.0 + move2 * -1.2); next.shoulder_r.position = Vec3::new( s_a.shoulder.0 + 2.0, s_a.shoulder.1, - s_a.shoulder.2 - slower * 1.0, + s_a.shoulder.2 + move2 * -1.0, ); - next.shoulder_r.orientation = Quaternion::rotation_y(-0.6 + slower * 0.3); + next.shoulder_r.orientation = Quaternion::rotation_y(move1 * -1.0 + move2 * 1.2); - next.hand_l.position = Vec3::new( - -s_a.hand.0 - 1.0, - s_a.hand.1, - s_a.hand.2 - slower * 0.5 + breathe * -1.0, - ); - next.hand_l.orientation = Quaternion::rotation_y(-0.6 + slower * 0.3); + next.hand_l.orientation = Quaternion::rotation_y(move1 * -1.0 + move2 * 1.2); - next.hand_r.position = Vec3::new( - s_a.hand.0 + 1.0, - s_a.hand.1, - s_a.hand.2 - slower * 0.5 + breathe * -1.0, - ); next.hand_r.orientation = - Quaternion::rotation_z(0.0) * Quaternion::rotation_y(0.6 + slower * -0.3); + Quaternion::rotation_z(0.0) * Quaternion::rotation_y(move1 * 1.0 + move2 * -1.2); if velocity < 0.5 { - next.leg_l.position = - Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2 + slower * -0.5) * 1.02; + next.leg_l.position = Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2 + move2 * 2.0) * 1.02; - next.leg_r.position = Vec3::new(s_a.leg.0, s_a.leg.1, s_a.leg.2 + slower * -0.5) * 1.02; + next.leg_r.position = Vec3::new(s_a.leg.0, s_a.leg.1, s_a.leg.2 + move2 * 2.0) * 1.02; - next.foot_l.position = Vec3::new( - -s_a.foot.0, - s_a.foot.1, - s_a.foot.2 + slower * 2.5 + breathe * -1.0, - ); + next.foot_l.position = Vec3::new(-s_a.foot.0, s_a.foot.1, s_a.foot.2 + move2); - next.foot_r.position = Vec3::new( - s_a.foot.0, - s_a.foot.1, - s_a.foot.2 + slower * 2.5 + breathe * -1.0, - ); + next.foot_r.position = Vec3::new(s_a.foot.0, s_a.foot.1, s_a.foot.2 + move2); } else { } next diff --git a/voxygen/anim/src/quadruped_small/mod.rs b/voxygen/anim/src/quadruped_small/mod.rs index 2c5637bf2f..322d5d4ccc 100644 --- a/voxygen/anim/src/quadruped_small/mod.rs +++ b/voxygen/anim/src/quadruped_small/mod.rs @@ -281,7 +281,7 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Rat, _) => (1.0), (Axolotl, _) => (1.2), (Gecko, _) => (1.1), - (Turtle, _) => (0.9), + (Turtle, _) => (3.0), (Squirrel, _) => (1.15), (Porcupine, _) => (1.2), (Beaver, _) => (1.2), @@ -357,7 +357,7 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Frog, _) => (0.7), (Axolotl, _) => (0.8), (Gecko, _) => (0.8), - (Turtle, _) => (0.7), + (Turtle, _) => (0.5), (Fungome, _) => (0.7), (Hare, _) => (1.2), _ => (1.0), diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index 99304d69ad..0cf66bbbbc 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -3795,11 +3795,24 @@ impl FigureMgr { skeleton_attr, ) }, - CharacterState::Shockwave(_) => { + CharacterState::Shockwave(s) => { + let stage_time = s.timer.as_secs_f64(); + let stage_progress = match s.stage_section { + StageSection::Buildup => { + stage_time / s.static_data.buildup_duration.as_secs_f64() + }, + StageSection::Swing => { + stage_time / s.static_data.swing_duration.as_secs_f64() + }, + StageSection::Recover => { + stage_time / s.static_data.recover_duration.as_secs_f64() + }, + _ => 0.0, + }; anim::golem::ShockwaveAnimation::update_skeleton( &target_base, - (vel.0.magnitude(), time), - state.state_time, + (Some(s.stage_section), vel.0.magnitude(), time), + stage_progress, &mut state_animation_rate, skeleton_attr, )