species specific speeds, more animation

This commit is contained in:
jshipsey 2020-11-17 02:44:30 -05:00 committed by Sam
parent ee03304a3a
commit 1f59ef92d8
19 changed files with 374 additions and 68 deletions

View File

@ -1,10 +1,10 @@
BasicMelee(
energy_cost: 0,
buildup_duration: 250,
swing_duration: 250,
recover_duration: 250,
buildup_duration: 500,
swing_duration: 150,
recover_duration: 400,
base_damage: 200,
knockback: 25.0,
range: 2.0,
range: 4.0,
max_angle: 120.0,
)

View File

@ -10,7 +10,7 @@ ComboMelee(
angle: 30.0,
base_buildup_duration: 900,
base_swing_duration: 100,
base_recover_duration: 200,
base_recover_duration: 300,
forward_movement: 2.0,
),
(
@ -21,10 +21,10 @@ ComboMelee(
knockback: 10.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 200,
base_buildup_duration: 500,
base_swing_duration: 100,
base_recover_duration: 200,
forward_movement: 1.0,
base_recover_duration: 300,
forward_movement: 1.5,
),
(
stage: 3,
@ -34,10 +34,10 @@ ComboMelee(
knockback: 10.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 200,
base_buildup_duration: 500,
base_swing_duration: 100,
base_recover_duration: 200,
forward_movement: 1.0,
base_recover_duration: 300,
forward_movement: 1.5,
),
],
initial_energy_gain: 0,

View File

@ -1,8 +1,8 @@
BasicMelee(
energy_cost: 0,
buildup_duration: 250,
swing_duration: 250,
recover_duration: 250,
buildup_duration: 600,
swing_duration: 100,
recover_duration: 350,
base_damage: 200,
knockback: 25.0,
range: 2.0,

View File

@ -0,0 +1,10 @@
BasicMelee(
energy_cost: 0,
buildup_duration: 500,
swing_duration: 150,
recover_duration: 400,
base_damage: 200,
knockback: 25.0,
range: 4.0,
max_angle: 60.0,
)

View File

@ -0,0 +1,49 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 100,
max_damage: 120,
damage_increase: 10,
knockback: 5.0,
range: 3.5,
angle: 60.0,
base_buildup_duration: 800,
base_swing_duration: 150,
base_recover_duration: 400,
forward_movement: 3.0,
),
(
stage: 2,
base_damage: 80,
max_damage: 110,
damage_increase: 15,
knockback: 5.0,
range: 3.5,
angle: 60.0,
base_buildup_duration: 600,
base_swing_duration: 150,
base_recover_duration: 300,
forward_movement: 3.5,
),
(
stage: 3,
base_damage: 130,
max_damage: 170,
damage_increase: 20,
knockback: 5.0,
range: 3.5,
angle: 60.0,
base_buildup_duration: 600,
base_swing_duration: 150,
base_recover_duration: 300,
forward_movement: 4.5,
),
],
initial_energy_gain: 0,
max_energy_gain: 100,
energy_increase: 20,
speed_increase: 0.05,
max_speed_increase: 1.8,
is_interruptible: true,
)

View File

@ -0,0 +1,10 @@
BasicMelee(
energy_cost: 0,
buildup_duration: 500,
swing_duration: 100,
recover_duration: 400,
base_damage: 200,
knockback: 25.0,
range: 4.0,
max_angle: 120.0,
)

View File

@ -62,7 +62,7 @@
skills: [],
),
Unique(QuadMedQuick): (
primary: "common.abilities.unique.quadmedquick.dash",
primary: "common.abilities.unique.quadmedquick.basic",
secondary: "common.abilities.unique.quadmedquick.dash",
skills: [],
),
@ -71,6 +71,11 @@
secondary: "common.abilities.unique.quadmedjump.leap",
skills: [],
),
Unique(QuadMedBasic): (
primary: "common.abilities.unique.quadmedbasic.triplestrike",
secondary: "common.abilities.unique.quadmedbasic.triplestrike",
skills: [],
),
Unique(QuadLowRanged): (
primary: "common.abilities.unique.quadlowranged.basic",
secondary: "common.abilities.unique.quadlowranged.firebomb",
@ -87,8 +92,8 @@
skills: [],
),
Unique(QuadLowBasic): (
primary: "common.abilities.unique.quadlowbasic.basic",
secondary: "common.abilities.unique.quadlowbasic.triplestrike",
primary: "common.abilities.unique.quadlowbasic.triplestrike",
secondary: "common.abilities.unique.quadlowbasic.basic",
skills: [],
),
Debug: (

View File

@ -0,0 +1,15 @@
ItemDef(
name: "Quad Med Basic",
description: "testing123",
kind: Tool(
(
kind: Unique(QuadMedBasic),
stats: (
equip_time_millis: 10,
power: 1.00,
speed: 1.00,
),
)
),
quality: Low,
)

BIN
assets/voxygen/voxel/npc/roshwalr/male/vacation.vox (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -121,7 +121,7 @@
),
(Tuskram, Male): (
head: (
offset: (-10.0, -6.0, -6.5),
offset: (-10.0, -2.0, -6.5),
central: ("npc.tuskram.male.head"),
),
neck: (
@ -151,7 +151,7 @@
),
(Tuskram, Female): (
head: (
offset: (-10.0, -6.0, -6.5),
offset: (-10.0, -2.0, -6.5),
central: ("npc.tuskram.male.head"),
),
neck: (

View File

@ -174,6 +174,7 @@ pub enum UniqueKind {
BeastClaws,
QuadMedQuick,
QuadMedJump,
QuadMedBasic,
QuadLowRanged,
QuadLowTail,
QuadLowQuick,

View File

@ -116,7 +116,7 @@ impl LoadoutBuilder {
},
_ => {
main_tool = Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.quadmedquick",
"common.items.npc_weapons.unique.quadmedbasic",
));
},
},

View File

@ -1,7 +1,7 @@
use crate::{
comp::{
item::{Hands, ItemKind, Tool},
Body, CharacterState, StateUpdate,
quadruped_low, quadruped_medium, Body, CharacterState, StateUpdate,
},
event::LocalEvent,
states::*,
@ -38,7 +38,28 @@ impl Body {
match self {
Body::Humanoid(_) => 100.0,
Body::QuadrupedSmall(_) => 125.0,
Body::QuadrupedMedium(_) => 180.0,
Body::QuadrupedMedium(quadruped_medium) => match quadruped_medium.species {
quadruped_medium::Species::Grolgar => 110.0,
quadruped_medium::Species::Saber => 180.0,
quadruped_medium::Species::Tiger => 150.0,
quadruped_medium::Species::Tuskram => 160.0,
quadruped_medium::Species::Lion => 110.0,
quadruped_medium::Species::Tarasque => 100.0,
quadruped_medium::Species::Wolf => 180.0,
quadruped_medium::Species::Frostfang => 180.0,
quadruped_medium::Species::Mouflon => 100.0,
quadruped_medium::Species::Catoblepas => 70.0,
quadruped_medium::Species::Bonerattler => 130.0,
quadruped_medium::Species::Deer => 150.0,
quadruped_medium::Species::Hirdrasil => 160.0,
quadruped_medium::Species::Roshwalr => 75.0,
quadruped_medium::Species::Donkey => 110.0,
quadruped_medium::Species::Camel => 100.0,
quadruped_medium::Species::Zebra => 140.0,
quadruped_medium::Species::Antelope => 170.0,
quadruped_medium::Species::Kelpie => 175.0,
quadruped_medium::Species::Horse => 190.0,
},
Body::BirdMedium(_) => 80.0,
Body::FishMedium(_) => 50.0,
Body::Dragon(_) => 250.0,
@ -48,7 +69,19 @@ impl Body {
Body::Object(_) => 40.0,
Body::Golem(_) => 60.0,
Body::Theropod(_) => 135.0,
Body::QuadrupedLow(_) => 120.0,
Body::QuadrupedLow(quadruped_low) => match quadruped_low.species {
quadruped_low::Species::Crocodile => 130.0,
quadruped_low::Species::Alligator => 110.0,
quadruped_low::Species::Salamander => 85.0,
quadruped_low::Species::Monitor => 160.0,
quadruped_low::Species::Asp => 130.0,
quadruped_low::Species::Tortoise => 60.0,
quadruped_low::Species::Rocksnapper => 70.0,
quadruped_low::Species::Pangolin => 120.0,
quadruped_low::Species::Maneater => 80.0,
quadruped_low::Species::Sandshark => 70.0,
quadruped_low::Species::Hakulaq => 170.0,
},
}
}
@ -186,7 +219,7 @@ pub fn handle_forced_movement(
pub fn handle_orientation(data: &JoinData, update: &mut StateUpdate, rate: f32) {
// Set direction based on move direction
let ori_dir = if update.character.is_aimed() {
let ori_dir = if update.character.is_aimed() && data.body.is_humanoid() {
data.inputs.look_dir.xy()
} else if !data.inputs.move_dir.is_approx_zero() {
data.inputs.move_dir

View File

@ -358,6 +358,9 @@ impl<'a> System<'a> for Sys {
},
Some(ToolKind::Unique(UniqueKind::QuadMedQuick)) => Tactic::Wolf,
Some(ToolKind::Unique(UniqueKind::QuadMedJump)) => Tactic::QuadMedJump,
Some(ToolKind::Unique(UniqueKind::QuadMedBasic)) => {
Tactic::QuadLowBasic
},
Some(ToolKind::Unique(UniqueKind::QuadLowRanged)) => {
Tactic::QuadLowRanged
},

View File

@ -244,15 +244,15 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Hakulaq, _) => (1.0),
},
tempo: match (body.species, body.body_type) {
(Crocodile, _) => (0.8),
(Alligator, _) => (0.8),
(Salamander, _) => (1.0),
(Monitor, _) => (1.3),
(Crocodile, _) => (0.7),
(Alligator, _) => (0.7),
(Salamander, _) => (0.75),
(Monitor, _) => (1.4),
(Asp, _) => (1.0),
(Tortoise, _) => (0.9),
(Rocksnapper, _) => (0.9),
(Tortoise, _) => (0.7),
(Rocksnapper, _) => (0.7),
(Pangolin, _) => (1.15),
(Maneater, _) => (1.0),
(Maneater, _) => (0.9),
(Sandshark, _) => (1.0),
(Hakulaq, _) => (1.0),
},

View File

@ -16,18 +16,18 @@ impl Animation for AlphaAnimation {
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_medium_alpha")]
fn update_skeleton_inner(
skeleton: &Self::Skeleton,
(_velocity, global_time, stage_section, timer): Self::Dependency,
(velocity, global_time, stage_section, timer): Self::Dependency,
anim_time: f64,
_rate: &mut f32,
s_a: &SkeletonAttr,
) -> Self::Skeleton {
let mut next = (*skeleton).clone();
//let speed = (Vec2::<f32>::from(velocity).magnitude()).min(24.0);
let speed = (Vec2::<f32>::from(velocity).magnitude()).min(24.0);
let (movement1base, movement2base, movement3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time as f32).powf(1.0), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0),
Some(StageSection::Recover) => (0.0, 1.0, (anim_time as f32).powf(4.0)),
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, (anim_time as f32).powf(0.25), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powf(4.0)),
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - movement3;
@ -36,52 +36,65 @@ impl Animation for AlphaAnimation {
let mirror = (check - 0.5).signum() as f32;
let movement1 = movement1base * mirror * pullback;
let movement1abs = movement1base * pullback;
//let movement2 = movement2base*mirror*pullback;
let movement2 = movement2base * mirror * pullback;
let movement2abs = movement2base * pullback;
let twitch1 = (movement1 * 10.0).sin() * pullback;
let twitch2 = (movement3 * 5.0).sin() * pullback;
let twitchmovement = twitch1 + twitch2;
next.head.orientation = Quaternion::rotation_x(movement1abs * 0.2 + movement2abs * 0.2)
* Quaternion::rotation_y(twitchmovement * 0.3 * mirror);
next.head.orientation = Quaternion::rotation_x(movement1abs * -0.3 + movement2abs * 0.6)
* Quaternion::rotation_y(movement1 * 0.35 + movement2 * -0.15)
* Quaternion::rotation_z(movement1 * 0.15 + movement2 * -0.5);
next.neck.orientation = Quaternion::rotation_x(movement1abs * -0.2)
* Quaternion::rotation_y(twitchmovement * 0.1 * mirror);
next.neck.orientation = Quaternion::rotation_x(movement1abs * 0.2 + movement2abs * -0.2)
* Quaternion::rotation_y(movement1 * 0.0)
* Quaternion::rotation_z(movement1 * 0.10 + movement1 * -0.15);
next.jaw.orientation = Quaternion::rotation_x(twitchmovement * 0.1);
next.jaw.orientation = Quaternion::rotation_x(movement1abs * -0.7 + movement2abs * 0.7);
next.tail.orientation = Quaternion::rotation_z(twitchmovement * 1.0 * mirror);
next.tail.orientation = Quaternion::rotation_z(
movement1 * 0.5 + movement2 * -0.8 + twitchmovement * 0.2 * mirror,
);
next.torso_front.position = Vec3::new(
0.0,
s_a.torso_front.0 + movement1abs * -4.0,
s_a.torso_front.1,
) * s_a.scaler
/ 11.0;
next.torso_front.orientation = Quaternion::rotation_x(movement1abs * 0.3)
* Quaternion::rotation_y(twitchmovement * -0.1 * mirror);
next.torso_front.orientation = Quaternion::rotation_y(movement1 * -0.25 * movement2 * 0.25)
* Quaternion::rotation_z(movement1 * 0.35 + movement2 * -0.45);
next.torso_back.orientation = Quaternion::rotation_x(movement1abs * -0.45)
* Quaternion::rotation_y(twitchmovement * 0.1 * mirror);
next.torso_back.orientation = Quaternion::rotation_y(movement1 * 0.25 + movement1 * -0.25)
* Quaternion::rotation_z(movement1 * -0.4 + movement2 * 0.65);
next.ears.orientation = Quaternion::rotation_x(twitchmovement * 0.1);
next.leg_fl.orientation = Quaternion::rotation_x(movement1abs * 0.8)
* Quaternion::rotation_y(twitchmovement * 0.1 * mirror);
next.ears.orientation = Quaternion::rotation_x(twitchmovement * 0.2);
if speed < 0.5 {
next.leg_fl.orientation =
Quaternion::rotation_x(movement1abs * 0.8 + movement2abs * -0.6)
* Quaternion::rotation_y(movement1 * -0.3 + movement2 * 0.3)
* Quaternion::rotation_z(movement1 * -0.35 + movement2 * 0.45);
next.leg_fr.orientation = Quaternion::rotation_x(movement1abs * 0.8)
* Quaternion::rotation_y(twitchmovement * 0.1 * mirror);
next.leg_fr.orientation =
Quaternion::rotation_x(movement1abs * 0.8 + movement2abs * -0.6)
* Quaternion::rotation_y(movement1 * -0.3 + movement2 * 0.3)
* Quaternion::rotation_z(movement1 * -0.35 + movement2 * 0.45);
next.leg_bl.orientation = Quaternion::rotation_x(movement1abs * 0.4);
next.leg_bl.orientation = Quaternion::rotation_x(movement1 * 0.1 + movement2 * -0.3);
next.leg_br.orientation = Quaternion::rotation_x(movement1abs * 0.4);
next.leg_br.orientation = Quaternion::rotation_x(movement1 * -0.1 + movement2 * 0.3);
next.foot_fl.orientation = Quaternion::rotation_x(movement1abs * -0.9);
next.foot_fl.orientation =
Quaternion::rotation_x(movement1abs * -0.9 + movement2abs * 0.6);
next.foot_fr.orientation = Quaternion::rotation_x(movement1abs * -0.9);
next.foot_fr.orientation =
Quaternion::rotation_x(movement1abs * -0.9 + movement2abs * 0.6);
next.foot_bl.orientation = Quaternion::rotation_x(movement1abs * -1.1);
next.foot_br.orientation = Quaternion::rotation_x(movement1abs * -1.1);
next.foot_bl.orientation =
Quaternion::rotation_x(movement1abs * -0.5 + movement2abs * -0.3);
next.foot_br.orientation =
Quaternion::rotation_x(movement1abs * -0.5 + movement2abs * -0.3);
};
next
}
}

View File

@ -0,0 +1,100 @@
use super::{
super::{vek::*, Animation},
QuadrupedMediumSkeleton, SkeletonAttr,
};
use common::states::utils::StageSection;
pub struct BetaAnimation;
impl Animation for BetaAnimation {
type Dependency = (f32, f64, Option<StageSection>, f64);
type Skeleton = QuadrupedMediumSkeleton;
#[cfg(feature = "use-dyn-lib")]
const UPDATE_FN: &'static [u8] = b"quadruped_medium_beta\0";
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_medium_beta")]
fn update_skeleton_inner(
skeleton: &Self::Skeleton,
(velocity, global_time, stage_section, timer): Self::Dependency,
anim_time: f64,
_rate: &mut f32,
s_a: &SkeletonAttr,
) -> Self::Skeleton {
let mut next = (*skeleton).clone();
let speed = (Vec2::<f32>::from(velocity).magnitude()).min(24.0);
let (movement1base, movement2base, movement3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, (anim_time as f32).powf(0.5), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powf(4.0)),
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - movement3;
let subtract = global_time - timer;
let check = subtract - subtract.trunc();
let mirror = (check - 0.5).signum() as f32;
let movement1 = movement1base * mirror * pullback;
let movement1abs = movement1base * pullback;
let movement2 = movement2base * mirror * pullback;
let movement2abs = movement2base * pullback;
let twitch1 = (movement1 * 10.0).sin() * pullback;
let twitch2 = (movement2abs * -8.0).sin();
let twitchmovement = twitch1 + twitch2;
next.head.orientation = Quaternion::rotation_x(movement1abs * -0.4 + movement2abs * 1.1)
* Quaternion::rotation_y(movement1 * -0.35 + movement2 * 0.25)
* Quaternion::rotation_z(movement1 * -0.25 + movement2 * 0.5);
next.neck.orientation = Quaternion::rotation_x(movement1abs * 0.0 + movement2abs * -0.2)
* Quaternion::rotation_y(movement1 * 0.0)
* Quaternion::rotation_z(movement1 * -0.10 + movement1 * 0.15);
next.jaw.orientation = Quaternion::rotation_x(movement1abs * -0.5 + twitch2 * -0.4);
next.tail.orientation = Quaternion::rotation_z(
movement1 * 0.5 + movement2 * -0.8 + twitchmovement * 0.2 * mirror,
);
next.torso_front.position = Vec3::new(
0.0,
s_a.torso_front.0 + movement1abs * -4.0,
s_a.torso_front.1,
) * s_a.scaler
/ 11.0;
next.torso_front.orientation = Quaternion::rotation_y(movement1 * -0.25 * movement2 * 0.25)
* Quaternion::rotation_z(movement1 * 0.35 + movement2 * -0.45);
next.torso_back.orientation = Quaternion::rotation_y(movement1 * 0.25 + movement1 * -0.25)
* Quaternion::rotation_z(movement1 * -0.4 + movement2 * 0.65);
next.ears.orientation = Quaternion::rotation_x(twitchmovement * 0.2);
if speed < 0.5 {
next.leg_fl.orientation =
Quaternion::rotation_x(movement1abs * 0.8 + movement2abs * -0.6)
* Quaternion::rotation_y(movement1 * -0.3 + movement2 * 0.3)
* Quaternion::rotation_z(movement1 * -0.35 + movement2 * 0.45);
next.leg_fr.orientation =
Quaternion::rotation_x(movement1abs * 0.8 + movement2abs * -0.6)
* Quaternion::rotation_y(movement1 * -0.3 + movement2 * 0.3)
* Quaternion::rotation_z(movement1 * -0.35 + movement2 * 0.45);
next.leg_bl.orientation = Quaternion::rotation_x(movement1 * 0.1 + movement2 * -0.3);
next.leg_br.orientation = Quaternion::rotation_x(movement1 * -0.1 + movement2 * 0.3);
next.foot_fl.orientation =
Quaternion::rotation_x(movement1abs * -0.9 + movement2abs * 0.6);
next.foot_fr.orientation =
Quaternion::rotation_x(movement1abs * -0.9 + movement2abs * 0.6);
next.foot_bl.orientation =
Quaternion::rotation_x(movement1abs * -0.5 + movement2abs * -0.3);
next.foot_br.orientation =
Quaternion::rotation_x(movement1abs * -0.5 + movement2abs * -0.3);
};
next
}
}

View File

@ -1,4 +1,5 @@
pub mod alpha;
pub mod beta;
pub mod feed;
pub mod idle;
pub mod jump;
@ -7,8 +8,8 @@ pub mod run;
// Reexports
pub use self::{
alpha::AlphaAnimation, feed::FeedAnimation, idle::IdleAnimation, jump::JumpAnimation,
leapmelee::LeapMeleeAnimation, run::RunAnimation,
alpha::AlphaAnimation, beta::BetaAnimation, feed::FeedAnimation, idle::IdleAnimation,
jump::JumpAnimation, leapmelee::LeapMeleeAnimation, run::RunAnimation,
};
use super::{make_bone, vek::*, FigureBoneData, Skeleton};
@ -143,7 +144,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Lion, _) => (4.5, 2.0),
(Tarasque, _) => (-4.0, 3.5),
(Tiger, _) => (2.0, 1.0),
(Wolf, _) => (-0.5, 3.0),
(Wolf, _) => (1.5, 3.0),
(Frostfang, _) => (1.0, -2.0),
(Mouflon, _) => (0.5, 1.5),
(Catoblepas, _) => (-1.0, -6.5),
@ -167,7 +168,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Tarasque, _) => (-1.5, -4.0),
(Tiger, _) => (0.0, 0.0),
(Wolf, _) => (-4.5, 2.0),
(Frostfang, _) => (2.0, 1.5),
(Frostfang, _) => (0.5, 1.5),
(Mouflon, _) => (-1.0, 1.0),
(Catoblepas, _) => (19.5, -2.0),
(Bonerattler, _) => (9.0, -0.5),
@ -274,7 +275,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Saber, _) => (3.0, 5.5),
(Tuskram, _) => (5.5, 12.0),
(Lion, _) => (2.0, 3.5),
(Tarasque, _) => (11.0, -3.0),
(Tarasque, _) => (12.0, -3.0),
(Tiger, _) => (2.5, 4.0),
(Wolf, _) => (3.0, 2.5),
(Frostfang, _) => (2.0, 3.5),
@ -425,7 +426,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Horse, _) => (0.0),
},
tempo: match (body.species, body.body_type) {
(Grolgar, _) => (0.95),
(Grolgar, _) => (0.85),
(Saber, _) => (1.1),
(Tuskram, _) => (0.9),
(Lion, _) => (0.95),
@ -438,7 +439,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Bonerattler, _) => (1.0),
(Deer, _) => (0.85),
(Hirdrasil, _) => (0.85),
(Roshwalr, _) => (0.95),
(Roshwalr, _) => (0.75),
(Donkey, _) => (0.85),
(Camel, _) => (0.85),
(Zebra, _) => (0.85),
@ -447,7 +448,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Horse, _) => (0.85),
},
spring: match (body.species, body.body_type) {
(Grolgar, _) => (1.0),
(Grolgar, _) => (0.9),
(Saber, _) => (0.9),
(Tuskram, _) => (0.9),
(Lion, _) => (1.0),
@ -456,7 +457,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Wolf, _) => (1.2),
(Frostfang, _) => (1.0),
(Mouflon, _) => (0.9),
(Catoblepas, _) => (0.7),
(Catoblepas, _) => (0.55),
(Bonerattler, _) => (1.1),
(Deer, _) => (0.9),
(Hirdrasil, _) => (1.1),

View File

@ -1615,6 +1615,69 @@ impl FigureMgr {
skeleton_attr,
)
},
CharacterState::ComboMelee(s) => {
let stage_index = (s.stage - 1) as usize;
let stage_time = s.timer.as_secs_f64();
let stage_progress = match s.stage_section {
StageSection::Buildup => {
stage_time
/ s.static_data.stage_data[stage_index]
.base_buildup_duration
.as_secs_f64()
},
StageSection::Swing => {
stage_time
/ s.static_data.stage_data[stage_index]
.base_swing_duration
.as_secs_f64()
},
StageSection::Recover => {
stage_time
/ s.static_data.stage_data[stage_index]
.base_recover_duration
.as_secs_f64()
},
_ => 0.0,
};
match s.stage {
1 => anim::quadruped_medium::AlphaAnimation::update_skeleton(
&target_base,
(
vel.0.magnitude(),
time,
Some(s.stage_section),
state.state_time,
),
stage_progress,
&mut state_animation_rate,
skeleton_attr,
),
2 => anim::quadruped_medium::BetaAnimation::update_skeleton(
&target_base,
(
vel.0.magnitude(),
time,
Some(s.stage_section),
state.state_time,
),
stage_progress,
&mut state_animation_rate,
skeleton_attr,
),
_ => anim::quadruped_medium::AlphaAnimation::update_skeleton(
&target_base,
(
vel.0.magnitude(),
time,
Some(s.stage_section),
state.state_time,
),
stage_progress,
&mut state_animation_rate,
skeleton_attr,
),
}
},
CharacterState::Sit { .. } => {
anim::quadruped_medium::FeedAnimation::update_skeleton(
&target_base,