mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
readded cidle
This commit is contained in:
@ -41,9 +41,9 @@ impl<'a> System<'a> for Sys {
|
|||||||
//(true, Stand, Wield { .. }) => Animation::Cidle,
|
//(true, Stand, Wield { .. }) => Animation::Cidle,
|
||||||
//(true, Run, Wield { .. }) => Animation::Crun,
|
//(true, Run, Wield { .. }) => Animation::Crun,
|
||||||
//(false, Jump, Wield { .. }) => Animation::Cjump,
|
//(false, Jump, Wield { .. }) => Animation::Cjump,
|
||||||
(_, Glide, Idle) => Animation::Gliding,
|
//(_, Glide, Idle) => Animation::Gliding,
|
||||||
(_, _, Attack { .. }) => Animation::Attack,
|
//(_, _, Attack { .. }) => Animation::Attack,
|
||||||
(_, _, Block { .. }) => Animation::Block,
|
//(_, _, Block { .. }) => Animation::Block,
|
||||||
// Impossible animation (Caused by missing animations or syncing delays)
|
// Impossible animation (Caused by missing animations or syncing delays)
|
||||||
_ => Animation::Gliding,
|
_ => Animation::Gliding,
|
||||||
};
|
};
|
||||||
|
@ -81,7 +81,7 @@ impl Animation for RunAnimation {
|
|||||||
next.r_foot.offset = Vec3::new(3.4, 0.0 - wave_cos * 1.0, 6.0 - wave_cos_dub * 0.7);
|
next.r_foot.offset = Vec3::new(3.4, 0.0 - wave_cos * 1.0, 6.0 - wave_cos_dub * 0.7);
|
||||||
next.r_foot.ori = Quaternion::rotation_x(-0.0 + wave_cos * 1.5);
|
next.r_foot.ori = Quaternion::rotation_x(-0.0 + wave_cos * 1.5);
|
||||||
next.r_foot.scale = Vec3::one();
|
next.r_foot.scale = Vec3::one();
|
||||||
|
|
||||||
next.weapon.offset = Vec3::new(
|
next.weapon.offset = Vec3::new(
|
||||||
-7.0 + skeleton_attr.weapon_x,
|
-7.0 + skeleton_attr.weapon_x,
|
||||||
-5.0 + skeleton_attr.weapon_y,
|
-5.0 + skeleton_attr.weapon_y,
|
||||||
|
@ -701,7 +701,7 @@ impl FigureMgr {
|
|||||||
let time_since_movement_change =
|
let time_since_movement_change =
|
||||||
state.last_movement_change.elapsed().as_secs_f64();
|
state.last_movement_change.elapsed().as_secs_f64();
|
||||||
let time_since_action_change = state.last_action_change.elapsed().as_secs_f64();
|
let time_since_action_change = state.last_action_change.elapsed().as_secs_f64();
|
||||||
|
|
||||||
let target_base = match &character.movement {
|
let target_base = match &character.movement {
|
||||||
Stand => anim::character::StandAnimation::update_skeleton(
|
Stand => anim::character::StandAnimation::update_skeleton(
|
||||||
&CharacterSkeleton::new(),
|
&CharacterSkeleton::new(),
|
||||||
@ -736,10 +736,9 @@ impl FigureMgr {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let target_bones = match (&character.movement, &character.action) {
|
let target_bones = match (&character.movement, &character.action) {
|
||||||
|
(Stand, Wield { .. }) => anim::character::CidleAnimation::update_skeleton(
|
||||||
(_, Wield { .. }) => anim::character::CrunAnimation::update_skeleton(
|
|
||||||
&target_base,
|
&target_base,
|
||||||
(vel.0.magnitude(), time),
|
time,
|
||||||
time_since_action_change,
|
time_since_action_change,
|
||||||
skeleton_attr,
|
skeleton_attr,
|
||||||
),
|
),
|
||||||
@ -749,6 +748,12 @@ impl FigureMgr {
|
|||||||
time_since_action_change,
|
time_since_action_change,
|
||||||
skeleton_attr,
|
skeleton_attr,
|
||||||
),
|
),
|
||||||
|
(_, Wield { .. }) => anim::character::CrunAnimation::update_skeleton(
|
||||||
|
&target_base,
|
||||||
|
(vel.0.magnitude(), time),
|
||||||
|
time_since_action_change,
|
||||||
|
skeleton_attr,
|
||||||
|
),
|
||||||
(_, Block { .. }) => anim::character::BlockAnimation::update_skeleton(
|
(_, Block { .. }) => anim::character::BlockAnimation::update_skeleton(
|
||||||
&target_base,
|
&target_base,
|
||||||
time,
|
time,
|
||||||
|
Reference in New Issue
Block a user