mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Cockatrice bird_large conversion
This commit is contained in:
parent
0f6b902924
commit
eb98360183
@ -804,10 +804,6 @@
|
||||
keyword: "parrot",
|
||||
generic: "Parrot"
|
||||
),
|
||||
cockatrice: (
|
||||
keyword: "cockatrice",
|
||||
generic: "Cockatrice"
|
||||
)
|
||||
)
|
||||
),
|
||||
biped_large: (
|
||||
@ -1080,6 +1076,10 @@
|
||||
keyword: "phoenix",
|
||||
generic: "Phoenix"
|
||||
),
|
||||
cockatrice: (
|
||||
keyword: "cockatrice",
|
||||
generic: "Cockatrice"
|
||||
),
|
||||
)
|
||||
),
|
||||
quadruped_low: (
|
||||
|
@ -51,4 +51,56 @@
|
||||
central: ("npc.phoenix.male.tail_rear"),
|
||||
)
|
||||
),
|
||||
(Cockatrice, Male): (
|
||||
head: (
|
||||
offset: (-4.5, -6.0, -3.5),
|
||||
central: ("npc.cockatrice.male.head"),
|
||||
),
|
||||
beak: (
|
||||
offset: (-1.5, 0.0, -1.5),
|
||||
central: ("npc.cockatrice.male.beak"),
|
||||
),
|
||||
neck: (
|
||||
offset: (-3.5, -0.0, -6.0),
|
||||
central: ("npc.cockatrice.male.neck"),
|
||||
),
|
||||
chest: (
|
||||
offset: (-5.5, -10.0, -9.5),
|
||||
central: ("npc.cockatrice.male.chest"),
|
||||
),
|
||||
tail_front: (
|
||||
offset: (-2.5, -9.0, -6.0),
|
||||
central: ("npc.cockatrice.male.tail_front"),
|
||||
),
|
||||
tail_rear: (
|
||||
offset: (-2.5, -13.0, -3.0),
|
||||
central: ("npc.cockatrice.male.tail_rear"),
|
||||
)
|
||||
),
|
||||
(Cockatrice, Female): (
|
||||
head: (
|
||||
offset: (-4.5, -6.0, -3.5),
|
||||
central: ("npc.cockatrice.male.head"),
|
||||
),
|
||||
beak: (
|
||||
offset: (-1.5, 0.0, -1.5),
|
||||
central: ("npc.cockatrice.male.beak"),
|
||||
),
|
||||
neck: (
|
||||
offset: (-3.5, -0.0, -6.0),
|
||||
central: ("npc.cockatrice.male.neck"),
|
||||
),
|
||||
chest: (
|
||||
offset: (-5.5, -10.0, -9.5),
|
||||
central: ("npc.cockatrice.male.chest"),
|
||||
),
|
||||
tail_front: (
|
||||
offset: (-2.5, -9.0, -6.0),
|
||||
central: ("npc.cockatrice.male.tail_front"),
|
||||
),
|
||||
tail_rear: (
|
||||
offset: (-2.5, -13.0, -3.0),
|
||||
central: ("npc.cockatrice.male.tail_rear"),
|
||||
)
|
||||
),
|
||||
})
|
||||
|
@ -83,4 +83,88 @@
|
||||
lateral: ("npc.phoenix.male.foot_r"),
|
||||
)
|
||||
),
|
||||
(Cockatrice, Male): (
|
||||
wing_in_l: (
|
||||
offset: (-7.0, -8.0, -2.0),
|
||||
lateral: ("npc.cockatrice.male.wing_in_l"),
|
||||
),
|
||||
wing_in_r: (
|
||||
offset: (0.0, -8.0, -2.0),
|
||||
lateral: ("npc.cockatrice.male.wing_in_r"),
|
||||
),
|
||||
wing_mid_l: (
|
||||
offset: (-5.0, -9.0, -2.0),
|
||||
lateral: ("npc.cockatrice.male.wing_mid_l"),
|
||||
),
|
||||
wing_mid_r: (
|
||||
offset: (0.0, -9.0, -2.0),
|
||||
lateral: ("npc.cockatrice.male.wing_mid_r"),
|
||||
),
|
||||
wing_out_l: (
|
||||
offset: (-10.0, -11.0, -2.0),
|
||||
lateral: ("npc.cockatrice.male.wing_out_l"),
|
||||
),
|
||||
wing_out_r: (
|
||||
offset: (0.0, -11.0, -2.0),
|
||||
lateral: ("npc.cockatrice.male.wing_out_r"),
|
||||
),
|
||||
leg_l: (
|
||||
offset: (-3.0, -4.5, -4.0),
|
||||
lateral: ("npc.cockatrice.male.leg_l"),
|
||||
),
|
||||
leg_r: (
|
||||
offset: (-3.0, -4.5, -4.0),
|
||||
lateral: ("npc.cockatrice.male.leg_r"),
|
||||
),
|
||||
foot_l: (
|
||||
offset: (-3.5, -5.5, -10.0),
|
||||
lateral: ("npc.cockatrice.male.foot_l"),
|
||||
),
|
||||
foot_r: (
|
||||
offset: (-3.5, -5.5, -10.0),
|
||||
lateral: ("npc.cockatrice.male.foot_r"),
|
||||
)
|
||||
),
|
||||
(Cockatrice, Female): (
|
||||
wing_in_l: (
|
||||
offset: (-7.0, -8.0, -2.0),
|
||||
lateral: ("npc.cockatrice.male.wing_in_l"),
|
||||
),
|
||||
wing_in_r: (
|
||||
offset: (0.0, -8.0, -2.0),
|
||||
lateral: ("npc.cockatrice.male.wing_in_r"),
|
||||
),
|
||||
wing_mid_l: (
|
||||
offset: (-5.0, -9.0, -2.0),
|
||||
lateral: ("npc.cockatrice.male.wing_mid_l"),
|
||||
),
|
||||
wing_mid_r: (
|
||||
offset: (0.0, -9.0, -2.0),
|
||||
lateral: ("npc.cockatrice.male.wing_mid_r"),
|
||||
),
|
||||
wing_out_l: (
|
||||
offset: (-10.0, -11.0, -2.0),
|
||||
lateral: ("npc.cockatrice.male.wing_out_l"),
|
||||
),
|
||||
wing_out_r: (
|
||||
offset: (0.0, -11.0, -2.0),
|
||||
lateral: ("npc.cockatrice.male.wing_out_r"),
|
||||
),
|
||||
leg_l: (
|
||||
offset: (-3.0, -4.5, -4.0),
|
||||
lateral: ("npc.cockatrice.male.leg_l"),
|
||||
),
|
||||
leg_r: (
|
||||
offset: (-3.0, -4.5, -4.0),
|
||||
lateral: ("npc.cockatrice.male.leg_r"),
|
||||
),
|
||||
foot_l: (
|
||||
offset: (-3.5, -5.5, -10.0),
|
||||
lateral: ("npc.cockatrice.male.foot_l"),
|
||||
),
|
||||
foot_r: (
|
||||
offset: (-3.5, -5.5, -10.0),
|
||||
lateral: ("npc.cockatrice.male.foot_r"),
|
||||
)
|
||||
),
|
||||
})
|
@ -195,32 +195,4 @@
|
||||
central: ("npc.parrot.male.tail"),
|
||||
)
|
||||
),
|
||||
(Cockatrice, Male): (
|
||||
head: (
|
||||
offset: (-2.5, 0.0, -8.0),
|
||||
central: ("npc.cockatrice.male.head"),
|
||||
),
|
||||
torso: (
|
||||
offset: (-3.5, -6.5, -7.5),
|
||||
central: ("npc.cockatrice.male.torso"),
|
||||
),
|
||||
tail: (
|
||||
offset: (-1.5, -3.5, -4.0),
|
||||
central: ("npc.cockatrice.male.tail"),
|
||||
)
|
||||
),
|
||||
(Cockatrice, Female): (
|
||||
head: (
|
||||
offset: (-2.5, 0.0, -8.0),
|
||||
central: ("npc.cockatrice.male.head"),
|
||||
),
|
||||
torso: (
|
||||
offset: (-3.5, -6.5, -7.5),
|
||||
central: ("npc.cockatrice.male.torso"),
|
||||
),
|
||||
tail: (
|
||||
offset: (-1.5, -3.5, -4.0),
|
||||
central: ("npc.cockatrice.male.tail"),
|
||||
)
|
||||
),
|
||||
})
|
@ -251,40 +251,4 @@
|
||||
lateral: ("npc.parrot.male.leg_r"),
|
||||
)
|
||||
),
|
||||
(Cockatrice, Male): (
|
||||
wing_l: (
|
||||
offset: (-2.0, -3.0, -9.0),
|
||||
lateral: ("npc.cockatrice.male.wing_r"),
|
||||
),
|
||||
wing_r: (
|
||||
offset: (-2.0, -3.0, -9.0),
|
||||
lateral: ("npc.cockatrice.male.wing_r"),
|
||||
),
|
||||
foot_l: (
|
||||
offset: (-2.5, 0.0, -12.0),
|
||||
lateral: ("npc.cockatrice.male.leg_r"),
|
||||
),
|
||||
foot_r: (
|
||||
offset: (-2.5, 0.0, -12.0),
|
||||
lateral: ("npc.cockatrice.male.leg_r"),
|
||||
)
|
||||
),
|
||||
(Cockatrice, Female): (
|
||||
wing_l: (
|
||||
offset: (-2.0, -3.0, -9.0),
|
||||
lateral: ("npc.cockatrice.male.wing_r"),
|
||||
),
|
||||
wing_r: (
|
||||
offset: (-2.0, -3.0, -9.0),
|
||||
lateral: ("npc.cockatrice.male.wing_r"),
|
||||
),
|
||||
foot_l: (
|
||||
offset: (-2.5, 0.0, -12.0),
|
||||
lateral: ("npc.cockatrice.male.leg_r"),
|
||||
),
|
||||
foot_r: (
|
||||
offset: (-2.5, 0.0, -12.0),
|
||||
lateral: ("npc.cockatrice.male.leg_r"),
|
||||
)
|
||||
),
|
||||
})
|
BIN
assets/voxygen/voxel/npc/cockatrice/male/beak.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cockatrice/male/beak.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cockatrice/male/chest.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cockatrice/male/chest.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cockatrice/male/foot_l.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cockatrice/male/foot_l.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cockatrice/male/foot_r.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cockatrice/male/foot_r.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cockatrice/male/head.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/npc/cockatrice/male/head.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cockatrice/male/leg_l.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cockatrice/male/leg_l.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cockatrice/male/leg_r.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/npc/cockatrice/male/leg_r.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cockatrice/male/neck.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cockatrice/male/neck.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cockatrice/male/tail.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/npc/cockatrice/male/tail.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cockatrice/male/tail_front.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cockatrice/male/tail_front.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cockatrice/male/tail_rear.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cockatrice/male/tail_rear.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cockatrice/male/torso.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/npc/cockatrice/male/torso.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cockatrice/male/wing_in_l.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cockatrice/male/wing_in_l.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cockatrice/male/wing_in_r.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cockatrice/male/wing_in_r.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cockatrice/male/wing_mid_l.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cockatrice/male/wing_mid_l.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cockatrice/male/wing_mid_r.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cockatrice/male/wing_mid_r.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cockatrice/male/wing_out_l.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cockatrice/male/wing_out_l.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cockatrice/male/wing_out_r.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cockatrice/male/wing_out_r.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cockatrice/male/wing_r.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/npc/cockatrice/male/wing_r.vox
(Stored with Git LFS)
Binary file not shown.
@ -283,11 +283,8 @@ impl Body {
|
||||
_ => Vec3::new(4.6, 3.0, 6.0),
|
||||
},
|
||||
Body::BipedSmall(_) => Vec3::new(1.0, 0.75, 1.4),
|
||||
Body::BirdMedium(body) => match body.species {
|
||||
bird_medium::Species::Cockatrice => Vec3::new(2.0, 1.0, 1.8),
|
||||
_ => Vec3::new(2.0, 1.0, 1.1),
|
||||
},
|
||||
Body::BirdLarge(_) => Vec3::new(1.2, 0.6, 1.1),
|
||||
Body::BirdMedium(_) => Vec3::new(2.0, 1.0, 1.1),
|
||||
Body::BirdLarge(_) => Vec3::new(2.0, 1.0, 1.8),
|
||||
Body::Dragon(_) => Vec3::new(16.0, 10.0, 16.0),
|
||||
Body::FishMedium(_) => Vec3::new(0.5, 2.0, 0.8),
|
||||
Body::FishSmall(_) => Vec3::new(0.3, 1.2, 0.6),
|
||||
@ -431,7 +428,6 @@ impl Body {
|
||||
bird_medium::Species::Goose => 60,
|
||||
bird_medium::Species::Parrot => 60,
|
||||
bird_medium::Species::Peacock => 60,
|
||||
bird_medium::Species::Cockatrice => 400,
|
||||
bird_medium::Species::Eagle => 400,
|
||||
_ => 100,
|
||||
},
|
||||
@ -544,7 +540,6 @@ impl Body {
|
||||
bird_medium::Species::Goose => 10,
|
||||
bird_medium::Species::Parrot => 10,
|
||||
bird_medium::Species::Peacock => 10,
|
||||
bird_medium::Species::Cockatrice => 10,
|
||||
bird_medium::Species::Eagle => 10,
|
||||
_ => 20,
|
||||
},
|
||||
|
@ -35,6 +35,7 @@ make_case_elim!(
|
||||
#[repr(u32)]
|
||||
pub enum Species {
|
||||
Phoenix = 0,
|
||||
Cockatrice = 1,
|
||||
}
|
||||
);
|
||||
|
||||
@ -44,6 +45,7 @@ make_case_elim!(
|
||||
#[derive(Clone, Debug, Deserialize)]
|
||||
pub struct AllSpecies<SpeciesMeta> {
|
||||
pub phoenix: SpeciesMeta,
|
||||
pub cockatrice: SpeciesMeta,
|
||||
}
|
||||
|
||||
impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta> {
|
||||
@ -53,11 +55,15 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta>
|
||||
fn index(&self, &index: &'a Species) -> &Self::Output {
|
||||
match index {
|
||||
Species::Phoenix => &self.phoenix,
|
||||
Species::Cockatrice => &self.cockatrice,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub const ALL_SPECIES: [Species; 1] = [Species::Phoenix];
|
||||
pub const ALL_SPECIES: [Species; 2] = [
|
||||
Species::Phoenix,
|
||||
Species::Cockatrice,
|
||||
];
|
||||
|
||||
impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies<SpeciesMeta> {
|
||||
type IntoIter = std::iter::Copied<std::slice::Iter<'static, Self::Item>>;
|
||||
|
@ -41,7 +41,6 @@ make_case_elim!(
|
||||
Eagle = 4,
|
||||
Owl = 5,
|
||||
Parrot = 6,
|
||||
Cockatrice = 7,
|
||||
}
|
||||
);
|
||||
|
||||
@ -57,7 +56,6 @@ pub struct AllSpecies<SpeciesMeta> {
|
||||
pub eagle: SpeciesMeta,
|
||||
pub owl: SpeciesMeta,
|
||||
pub parrot: SpeciesMeta,
|
||||
pub cockatrice: SpeciesMeta,
|
||||
}
|
||||
|
||||
impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta> {
|
||||
@ -73,12 +71,11 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta>
|
||||
Species::Eagle => &self.eagle,
|
||||
Species::Owl => &self.owl,
|
||||
Species::Parrot => &self.parrot,
|
||||
Species::Cockatrice => &self.cockatrice,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub const ALL_SPECIES: [Species; 8] = [
|
||||
pub const ALL_SPECIES: [Species; 7] = [
|
||||
Species::Duck,
|
||||
Species::Chicken,
|
||||
Species::Goose,
|
||||
@ -86,7 +83,6 @@ pub const ALL_SPECIES: [Species; 8] = [
|
||||
Species::Eagle,
|
||||
Species::Owl,
|
||||
Species::Parrot,
|
||||
Species::Cockatrice,
|
||||
];
|
||||
|
||||
impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies<SpeciesMeta> {
|
||||
|
101
voxygen/anim/src/bird_large/feed.rs
Normal file
101
voxygen/anim/src/bird_large/feed.rs
Normal file
@ -0,0 +1,101 @@
|
||||
use super::{
|
||||
super::{vek::*, Animation},
|
||||
BirdLargeSkeleton, SkeletonAttr,
|
||||
};
|
||||
use std::ops::Mul;
|
||||
|
||||
pub struct FeedAnimation;
|
||||
|
||||
impl Animation for FeedAnimation {
|
||||
type Dependency = f32;
|
||||
type Skeleton = BirdLargeSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_feed\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_feed")]
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
global_time: Self::Dependency,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
) -> Self::Skeleton {
|
||||
let mut next = (*skeleton).clone();
|
||||
|
||||
let duck_head_look = Vec2::new(
|
||||
(global_time / 2.0 + anim_time / 8.0)
|
||||
.floor()
|
||||
.mul(7331.0)
|
||||
.sin()
|
||||
* 0.5,
|
||||
(global_time / 2.0 + anim_time / 8.0)
|
||||
.floor()
|
||||
.mul(1337.0)
|
||||
.sin()
|
||||
* 0.25,
|
||||
);
|
||||
let wave_slow_cos = (anim_time * 4.5).cos();
|
||||
let wave_fast = (anim_time * 9.0).cos();
|
||||
let beak = (anim_time * 16.0).sin();
|
||||
|
||||
next.head.scale = Vec3::one() * 0.98;
|
||||
next.neck.scale = Vec3::one() * 1.02;
|
||||
next.beak.scale = Vec3::one() * 0.98;
|
||||
next.leg_l.scale = Vec3::one() * 0.98;
|
||||
next.leg_r.scale = Vec3::one() * 0.98;
|
||||
next.foot_l.scale = Vec3::one() * 0.98;
|
||||
next.foot_r.scale = Vec3::one() * 0.98;
|
||||
next.chest.scale = Vec3::one() * s_a.scaler / 4.0;
|
||||
|
||||
next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1 + wave_slow_cos * 0.06 - 1.8)
|
||||
* s_a.scaler
|
||||
/ 4.0;
|
||||
next.chest.orientation = Quaternion::rotation_x(-0.5);
|
||||
|
||||
next.neck.position = Vec3::new(0.0, s_a.neck.0, s_a.neck.1);
|
||||
next.neck.orientation = Quaternion::rotation_x(-0.8);
|
||||
|
||||
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
|
||||
next.head.orientation = Quaternion::rotation_z(duck_head_look.x)
|
||||
* Quaternion::rotation_x(0.2 - duck_head_look.y.abs() + wave_slow_cos * 0.01);
|
||||
|
||||
next.beak.position = Vec3::new(0.0, s_a.beak.0, s_a.beak.1);
|
||||
next.beak.orientation = Quaternion::rotation_x(beak * -0.1 - 0.1);
|
||||
|
||||
next.tail_front.position = Vec3::new(0.0, s_a.tail_front.0, s_a.tail_front.1);
|
||||
next.tail_front.orientation = Quaternion::rotation_x(0.0);
|
||||
next.tail_rear.position = Vec3::new(0.0, s_a.tail_rear.0, s_a.tail_rear.1);
|
||||
next.tail_rear.orientation = Quaternion::rotation_x(0.0);
|
||||
|
||||
next.wing_in_l.position = Vec3::new(-s_a.wing_in.0, s_a.wing_in.1, s_a.wing_in.2);
|
||||
next.wing_in_r.position = Vec3::new(s_a.wing_in.0, s_a.wing_in.1, s_a.wing_in.2);
|
||||
|
||||
next.wing_in_l.orientation =
|
||||
Quaternion::rotation_y(-s_a.wings_angle + 0.3 + wave_fast * 0.08) * Quaternion::rotation_z(0.2);
|
||||
next.wing_in_r.orientation =
|
||||
Quaternion::rotation_y(s_a.wings_angle - 0.3 - wave_fast * 0.08) * Quaternion::rotation_z(-0.2);
|
||||
|
||||
next.wing_mid_l.position = Vec3::new(-s_a.wing_mid.0, s_a.wing_mid.1, s_a.wing_mid.2);
|
||||
next.wing_mid_r.position = Vec3::new(s_a.wing_mid.0, s_a.wing_mid.1, s_a.wing_mid.2);
|
||||
next.wing_mid_l.orientation = Quaternion::rotation_y(-0.1) * Quaternion::rotation_z(0.7);
|
||||
next.wing_mid_r.orientation = Quaternion::rotation_y(0.1) * Quaternion::rotation_z(-0.7);
|
||||
|
||||
next.wing_out_l.position = Vec3::new(-s_a.wing_out.0, s_a.wing_out.1, s_a.wing_out.2);
|
||||
next.wing_out_r.position = Vec3::new(s_a.wing_out.0, s_a.wing_out.1, s_a.wing_out.2);
|
||||
next.wing_out_l.orientation = Quaternion::rotation_y(-0.2) * Quaternion::rotation_z(0.2);
|
||||
next.wing_out_r.orientation = Quaternion::rotation_y(0.2) * Quaternion::rotation_z(-0.2);
|
||||
|
||||
next.leg_l.position = Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2 - wave_slow_cos * 0.06);
|
||||
next.leg_l.orientation = Quaternion::rotation_x(0.5);
|
||||
next.leg_r.position = Vec3::new(s_a.leg.0, s_a.leg.1, s_a.leg.2 - wave_slow_cos * 0.06);
|
||||
next.leg_r.orientation = Quaternion::rotation_x(0.5);
|
||||
|
||||
next.foot_l.position = Vec3::new(-s_a.foot.0, s_a.foot.1, s_a.foot.2);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(0.0);
|
||||
next.foot_r.position = Vec3::new(s_a.foot.0, s_a.foot.1, s_a.foot.2);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(0.0);
|
||||
|
||||
next
|
||||
}
|
||||
}
|
@ -57,22 +57,31 @@ impl Animation for FlyAnimation {
|
||||
0.0
|
||||
} * 1.3;
|
||||
|
||||
next.head.scale = Vec3::one() * 0.98;
|
||||
next.neck.scale = Vec3::one() * 1.02;
|
||||
next.beak.scale = Vec3::one() * 0.98;
|
||||
next.leg_l.scale = Vec3::one() * 0.98;
|
||||
next.leg_r.scale = Vec3::one() * 0.98;
|
||||
next.foot_l.scale = Vec3::one() * 0.98;
|
||||
next.foot_r.scale = Vec3::one() * 0.98;
|
||||
next.chest.scale = Vec3::one() * s_a.scaler / 4.0;
|
||||
|
||||
next.neck.position = Vec3::new(0.0, s_a.neck.0, s_a.neck.1);
|
||||
next.neck.orientation = Quaternion::rotation_x(0.2);
|
||||
next.neck.orientation =
|
||||
Quaternion::rotation_x((-0.4 + 0.2 * velocity.xy().magnitude() / 5.0).max(-0.4));
|
||||
|
||||
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1 - 3.0);
|
||||
next.head.orientation = Quaternion::rotation_x(0.2 + fast * 0.05);
|
||||
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
|
||||
next.head.orientation =
|
||||
Quaternion::rotation_x((-0.6 + 0.2 * velocity.xy().magnitude() / 5.0).max(-0.6) + fast * 0.05);
|
||||
|
||||
next.beak.position = Vec3::new(0.0, s_a.beak.0, s_a.beak.1);
|
||||
|
||||
dbg!(velocity);
|
||||
if velocity.z > 2.0 {
|
||||
if velocity.z > 2.0 || velocity.xy().magnitude() < 1.8 {
|
||||
next.chest.position =
|
||||
Vec3::new(0.0, s_a.chest.0, s_a.chest.1 - flap4 * 1.5) * s_a.scaler / 4.0;
|
||||
next.chest.orientation =
|
||||
Quaternion::rotation_x(-0.5 - flap1 * 0.2) * Quaternion::rotation_y(tilt * 1.8);
|
||||
next.chest.orientation = Quaternion::rotation_x(
|
||||
(0.8 - 0.8 * velocity.xy().magnitude() / 5.0).max(-0.2) - flap1 * 0.2,
|
||||
) * Quaternion::rotation_y(tilt * 1.8 + fast * 0.01);
|
||||
|
||||
next.wing_in_l.position = Vec3::new(-s_a.wing_in.0, s_a.wing_in.1, s_a.wing_in.2);
|
||||
next.wing_in_r.position = Vec3::new(s_a.wing_in.0, s_a.wing_in.1, s_a.wing_in.2);
|
||||
@ -98,22 +107,36 @@ impl Animation for FlyAnimation {
|
||||
next.tail_rear.position = Vec3::new(0.0, s_a.tail_rear.0, s_a.tail_rear.1);
|
||||
next.tail_rear.orientation =
|
||||
Quaternion::rotation_x(-flap3 * 0.3) * Quaternion::rotation_z(-tilt * 1.0);
|
||||
|
||||
next.leg_l.position = Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2);
|
||||
next.leg_l.orientation = Quaternion::rotation_x(
|
||||
(-1.0 - 0.8 * velocity.xy().magnitude() / 5.0).max(-0.8) + flap1 * -0.1,
|
||||
);
|
||||
next.leg_r.position = Vec3::new(s_a.leg.0, s_a.leg.1, s_a.leg.2);
|
||||
next.leg_r.orientation = Quaternion::rotation_x(
|
||||
(-1.0 - 0.8 * velocity.xy().magnitude() / 5.0).max(-0.8) + flap1 * -0.1,
|
||||
);
|
||||
|
||||
next.foot_l.position = Vec3::new(-s_a.foot.0, s_a.foot.1, s_a.foot.2);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(flap1 * -0.05);
|
||||
next.foot_r.position = Vec3::new(s_a.foot.0, s_a.foot.1, s_a.foot.2);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(flap1 * -0.05);
|
||||
} else {
|
||||
next.chest.position =
|
||||
Vec3::new(0.0, s_a.chest.0, s_a.chest.1 + slow * 0.05) * s_a.scaler / 4.0;
|
||||
next.chest.orientation =
|
||||
Quaternion::rotation_x(-0.5 + slow * 0.05 + (0.8 * velocity.z / 80.0).min(0.8))
|
||||
* Quaternion::rotation_y(tilt * 1.8);
|
||||
Quaternion::rotation_x(-0.2 + slow * 0.05 + (0.8 * velocity.z / 80.0).min(0.8))
|
||||
* Quaternion::rotation_y(tilt * 1.8 + fast * 0.01);
|
||||
|
||||
next.wing_in_l.position = Vec3::new(-s_a.wing_in.0, s_a.wing_in.1, s_a.wing_in.2);
|
||||
next.wing_in_r.position = Vec3::new(s_a.wing_in.0, s_a.wing_in.1, s_a.wing_in.2);
|
||||
|
||||
next.wing_in_l.orientation =
|
||||
Quaternion::rotation_y(0.1 + slow * 0.04 + (0.8 * velocity.z / 80.0).min(0.8))
|
||||
* Quaternion::rotation_x(0.6);
|
||||
* Quaternion::rotation_x(0.4);
|
||||
next.wing_in_r.orientation =
|
||||
Quaternion::rotation_y(-0.1 + slow * -0.04 - (0.8 * velocity.z / 80.0).min(0.8))
|
||||
* Quaternion::rotation_x(0.6);
|
||||
* Quaternion::rotation_x(0.4);
|
||||
|
||||
next.wing_mid_l.position = Vec3::new(-s_a.wing_mid.0, s_a.wing_mid.1, s_a.wing_mid.2);
|
||||
next.wing_mid_r.position = Vec3::new(s_a.wing_mid.0, s_a.wing_mid.1, s_a.wing_mid.2);
|
||||
@ -133,17 +156,17 @@ impl Animation for FlyAnimation {
|
||||
next.tail_rear.position = Vec3::new(0.0, s_a.tail_rear.0, s_a.tail_rear.1);
|
||||
next.tail_rear.orientation =
|
||||
Quaternion::rotation_x(-0.2 + slow * 0.08) * Quaternion::rotation_z(-tilt * 1.0);
|
||||
}
|
||||
|
||||
next.leg_l.position = Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2);
|
||||
next.leg_l.orientation = Quaternion::rotation_x(-1.0 - flap1 * 0.1);
|
||||
next.leg_l.orientation = Quaternion::rotation_x(-1.0 + slow * -0.05);
|
||||
next.leg_r.position = Vec3::new(s_a.leg.0, s_a.leg.1, s_a.leg.2);
|
||||
next.leg_r.orientation = Quaternion::rotation_x(-1.0 - flap1 * 0.1);
|
||||
next.leg_r.orientation = Quaternion::rotation_x(-1.0 + slow * -0.05);
|
||||
|
||||
next.foot_l.position = Vec3::new(-s_a.foot.0, s_a.foot.1, s_a.foot.2);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(-1.0 - flap1 * 0.1);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(slow * -0.05);
|
||||
next.foot_r.position = Vec3::new(s_a.foot.0, s_a.foot.1, s_a.foot.2);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(-1.0 - flap1 * 0.1);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(slow * -0.05);
|
||||
}
|
||||
|
||||
next
|
||||
}
|
||||
|
@ -37,7 +37,15 @@ impl Animation for IdleAnimation {
|
||||
);
|
||||
let wave_slow_cos = (anim_time * 4.5).cos();
|
||||
|
||||
next.head.scale = Vec3::one() * 0.98;
|
||||
next.neck.scale = Vec3::one() * 1.02;
|
||||
next.beak.scale = Vec3::one() * 0.98;
|
||||
next.leg_l.scale = Vec3::one() * 0.98;
|
||||
next.leg_r.scale = Vec3::one() * 0.98;
|
||||
next.foot_l.scale = Vec3::one() * 0.98;
|
||||
next.foot_r.scale = Vec3::one() * 0.98;
|
||||
next.chest.scale = Vec3::one() * s_a.scaler / 4.0;
|
||||
|
||||
next.chest.position =
|
||||
Vec3::new(0.0, s_a.chest.0, s_a.chest.1 + wave_slow_cos * 0.06) * s_a.scaler / 4.0;
|
||||
next.chest.orientation = Quaternion::rotation_x(0.0);
|
||||
@ -61,9 +69,9 @@ impl Animation for IdleAnimation {
|
||||
next.wing_in_r.position = Vec3::new(s_a.wing_in.0, s_a.wing_in.1, s_a.wing_in.2);
|
||||
|
||||
next.wing_in_l.orientation =
|
||||
Quaternion::rotation_y(-1.3 + wave_slow_cos * 0.06) * Quaternion::rotation_z(0.2);
|
||||
Quaternion::rotation_y(-1.0 + wave_slow_cos * 0.06) * Quaternion::rotation_z(0.2);
|
||||
next.wing_in_r.orientation =
|
||||
Quaternion::rotation_y(1.3 - wave_slow_cos * 0.06) * Quaternion::rotation_z(-0.2);
|
||||
Quaternion::rotation_y(1.0 - wave_slow_cos * 0.06) * Quaternion::rotation_z(-0.2);
|
||||
|
||||
next.wing_mid_l.position = Vec3::new(-s_a.wing_mid.0, s_a.wing_mid.1, s_a.wing_mid.2);
|
||||
next.wing_mid_r.position = Vec3::new(s_a.wing_mid.0, s_a.wing_mid.1, s_a.wing_mid.2);
|
||||
|
@ -1,9 +1,10 @@
|
||||
pub mod feed;
|
||||
pub mod fly;
|
||||
pub mod idle;
|
||||
pub mod run;
|
||||
|
||||
// Reexports
|
||||
pub use self::{fly::FlyAnimation, idle::IdleAnimation, run::RunAnimation};
|
||||
pub use self::{feed::FeedAnimation, fly::FlyAnimation, idle::IdleAnimation, run::RunAnimation};
|
||||
|
||||
use super::{make_bone, vek::*, FigureBoneData, Skeleton};
|
||||
use common::comp::{self};
|
||||
@ -59,8 +60,8 @@ impl Skeleton for BirdLargeSkeleton {
|
||||
let wing_out_r_mat = wing_mid_r_mat * Mat4::<f32>::from(self.wing_out_r);
|
||||
let leg_l_mat = chest_mat * Mat4::<f32>::from(self.leg_l);
|
||||
let leg_r_mat = chest_mat * Mat4::<f32>::from(self.leg_r);
|
||||
let foot_l_mat = chest_mat * Mat4::<f32>::from(self.leg_l);
|
||||
let foot_r_mat = chest_mat * Mat4::<f32>::from(self.leg_r);
|
||||
let foot_l_mat = leg_l_mat * Mat4::<f32>::from(self.foot_l);
|
||||
let foot_r_mat = leg_r_mat * Mat4::<f32>::from(self.foot_r);
|
||||
|
||||
*(<&mut [_; Self::BONE_COUNT]>::try_from(&mut buf[0..Self::BONE_COUNT]).unwrap()) = [
|
||||
make_bone(head_mat),
|
||||
@ -97,6 +98,8 @@ pub struct SkeletonAttr {
|
||||
leg: (f32, f32, f32),
|
||||
foot: (f32, f32, f32),
|
||||
scaler: f32,
|
||||
wings_angle: f32,
|
||||
flight_angle: f32,
|
||||
}
|
||||
|
||||
impl<'a> std::convert::TryFrom<&'a comp::Body> for SkeletonAttr {
|
||||
@ -125,6 +128,8 @@ impl Default for SkeletonAttr {
|
||||
leg: (0.0, 0.0, 0.0),
|
||||
foot: (0.0, 0.0, 0.0),
|
||||
scaler: 0.0,
|
||||
wings_angle: 0.0,
|
||||
flight_angle: 0.0,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -134,40 +139,60 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
||||
use comp::bird_large::Species::*;
|
||||
Self {
|
||||
chest: match (body.species, body.body_type) {
|
||||
(Phoenix, _) => (2.5, 7.5),
|
||||
(Phoenix, _) => (2.5, 8.0),
|
||||
(Cockatrice, _) => (2.5, 16.0),
|
||||
},
|
||||
neck: match (body.species, body.body_type) {
|
||||
(Phoenix, _) => (0.5, 3.0),
|
||||
(Cockatrice, _) => (5.0, -1.5),
|
||||
},
|
||||
head: match (body.species, body.body_type) {
|
||||
(Phoenix, _) => (2.0, 2.0),
|
||||
(Cockatrice, _) => (8.0, 4.5),
|
||||
},
|
||||
beak: match (body.species, body.body_type) {
|
||||
(Phoenix, _) => (2.0, 1.0),
|
||||
(Cockatrice, _) => (2.0, -3.0),
|
||||
},
|
||||
tail_front: match (body.species, body.body_type) {
|
||||
(Phoenix, _) => (-5.5, -2.0),
|
||||
(Cockatrice, _) => (-5.0, -2.5),
|
||||
},
|
||||
tail_rear: match (body.species, body.body_type) {
|
||||
(Phoenix, _) => (-3.0, -3.0),
|
||||
(Cockatrice, _) => (-8.0, -3.0),
|
||||
},
|
||||
wing_in: match (body.species, body.body_type) {
|
||||
(Phoenix, _) => (3.0, 2.5, 3.0),
|
||||
(Cockatrice, _) => (3.5, 7.0, 3.5),
|
||||
},
|
||||
wing_mid: match (body.species, body.body_type) {
|
||||
(Phoenix, _) => (6.5, -1.0, 0.0),
|
||||
(Cockatrice, _) => (6.0, 0.0, 0.0),
|
||||
},
|
||||
wing_out: match (body.species, body.body_type) {
|
||||
(Phoenix, _) => (0.5, -1.0, 0.0),
|
||||
(Cockatrice, _) => (4.0, -1.0, 1.0),
|
||||
},
|
||||
leg: match (body.species, body.body_type) {
|
||||
(Phoenix, _) => (2.5, -2.5, -3.5),
|
||||
(Cockatrice, _) => (2.5, 2.5, -3.5),
|
||||
},
|
||||
foot: match (body.species, body.body_type) {
|
||||
(Phoenix, _) => (2.5, -16.5, -6.5),
|
||||
(Phoenix, _) => (0.0, -0.5, -0.5),
|
||||
(Cockatrice, _) => (1.5, -3.0, -3.0),
|
||||
},
|
||||
scaler: match (body.species, body.body_type) {
|
||||
(Phoenix, _) => (1.0),
|
||||
(Cockatrice, _) => (1.0),
|
||||
},
|
||||
wings_angle: match (body.species, body.body_type) {
|
||||
(Phoenix, _) => (1.3),
|
||||
(Cockatrice, _) => (0.9),
|
||||
},
|
||||
flight_angle: match (body.species, body.body_type) {
|
||||
(Phoenix, _) => (-0.5),
|
||||
(Cockatrice, _) => (1.0),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -61,11 +61,13 @@ impl Animation for RunAnimation {
|
||||
0.0
|
||||
} * 1.3;
|
||||
|
||||
next.head.scale = Vec3::one() * 1.02;
|
||||
next.neck.scale = Vec3::one() * 0.98;
|
||||
next.head.scale = Vec3::one() * 0.98;
|
||||
next.neck.scale = Vec3::one() * 1.02;
|
||||
next.beak.scale = Vec3::one() * 0.98;
|
||||
next.foot_l.scale = Vec3::one() * 0.96;
|
||||
next.foot_r.scale = Vec3::one() * 0.96;
|
||||
next.leg_l.scale = Vec3::one() * 0.98;
|
||||
next.leg_r.scale = Vec3::one() * 0.98;
|
||||
next.foot_l.scale = Vec3::one() * 0.98;
|
||||
next.foot_r.scale = Vec3::one() * 0.98;
|
||||
next.chest.scale = Vec3::one() * s_a.scaler / 4.0;
|
||||
|
||||
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
|
||||
@ -100,8 +102,8 @@ impl Animation for RunAnimation {
|
||||
next.wing_in_l.position = Vec3::new(-s_a.wing_in.0, s_a.wing_in.1, s_a.wing_in.2);
|
||||
next.wing_in_r.position = Vec3::new(s_a.wing_in.0, s_a.wing_in.1, s_a.wing_in.2);
|
||||
|
||||
next.wing_in_l.orientation = Quaternion::rotation_y(-1.3) * Quaternion::rotation_z(0.2);
|
||||
next.wing_in_r.orientation = Quaternion::rotation_y(1.3) * Quaternion::rotation_z(-0.2);
|
||||
next.wing_in_l.orientation = Quaternion::rotation_y(-s_a.wings_angle) * Quaternion::rotation_z(0.2);
|
||||
next.wing_in_r.orientation = Quaternion::rotation_y(s_a.wings_angle) * Quaternion::rotation_z(-0.2);
|
||||
|
||||
next.wing_mid_l.position = Vec3::new(-s_a.wing_mid.0, s_a.wing_mid.1, s_a.wing_mid.2);
|
||||
next.wing_mid_r.position = Vec3::new(s_a.wing_mid.0, s_a.wing_mid.1, s_a.wing_mid.2);
|
||||
@ -133,20 +135,21 @@ impl Animation for RunAnimation {
|
||||
|
||||
next.foot_l.position = Vec3::new(
|
||||
-s_a.foot.0,
|
||||
s_a.foot.1 + foot1b * -2.0,
|
||||
s_a.foot.2 + speednorm * 0.5 + (foot1a * 1.5).max(0.0),
|
||||
s_a.foot.1 + foot1b * -1.0,
|
||||
s_a.foot.2 + (foot1a * 1.5).max(0.0),
|
||||
);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(-0.2 * speednorm + foot1b * -0.35)
|
||||
next.foot_l.orientation = Quaternion::rotation_x(0.2 * speednorm + foot1b * -0.5 + 0.1)
|
||||
* Quaternion::rotation_y(tilt * -1.0)
|
||||
* Quaternion::rotation_z(tilt * -0.5);
|
||||
|
||||
next.foot_r.position = Vec3::new(
|
||||
s_a.foot.0,
|
||||
s_a.foot.1 + foot2b * -2.0,
|
||||
s_a.foot.2 + speednorm * 0.5 + (foot2a * 1.5).max(0.0),
|
||||
s_a.foot.1 + foot2b * -1.0,
|
||||
s_a.foot.2 + (foot2a * 1.5).max(0.0),
|
||||
);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(-0.2 * speednorm + foot2b * -0.35)
|
||||
* Quaternion::rotation_y(tilt * -1.0);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(0.2 * speednorm + foot2b * -0.5 + 0.1)
|
||||
* Quaternion::rotation_y(tilt * -1.0)
|
||||
* Quaternion::rotation_z(tilt * -0.5);
|
||||
|
||||
next
|
||||
}
|
||||
|
@ -99,7 +99,6 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
||||
(Owl, Male) => (2.5, 5.0),
|
||||
(Owl, Female) => (2.5, 7.0),
|
||||
(Parrot, _) => (0.5, 4.5),
|
||||
(Cockatrice, _) => (0.0, 4.0),
|
||||
},
|
||||
chest: match (body.species, body.body_type) {
|
||||
(Duck, _) => (0.0, 5.0),
|
||||
@ -111,7 +110,6 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
||||
(Owl, Male) => (0.0, 4.5),
|
||||
(Owl, Female) => (0.0, 4.5),
|
||||
(Parrot, _) => (0.0, 5.0),
|
||||
(Cockatrice, _) => (0.0, 12.5),
|
||||
},
|
||||
tail: match (body.species, body.body_type) {
|
||||
(Duck, _) => (-3.0, 1.5),
|
||||
@ -123,7 +121,6 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
||||
(Owl, Male) => (-6.0, -2.0),
|
||||
(Owl, Female) => (-6.0, -2.5),
|
||||
(Parrot, _) => (-8.0, -2.0),
|
||||
(Cockatrice, _) => (-10.0, -2.5),
|
||||
},
|
||||
wing: match (body.species, body.body_type) {
|
||||
(Duck, _) => (2.75, 0.0, 1.0),
|
||||
@ -135,7 +132,6 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
||||
(Owl, Male) => (3.5, -5.5, 4.0),
|
||||
(Owl, Female) => (3.5, -6.0, 3.5),
|
||||
(Parrot, _) => (2.0, -4.5, 3.0),
|
||||
(Cockatrice, _) => (4.5, -2.5, 1.5),
|
||||
},
|
||||
foot: match (body.species, body.body_type) {
|
||||
(Duck, _) => (2.0, -1.5, 4.0),
|
||||
@ -147,7 +143,6 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
||||
(Owl, Male) => (1.5, -2.5, 7.0),
|
||||
(Owl, Female) => (1.5, -3.0, 6.5),
|
||||
(Parrot, _) => (1.5, -3.0, 3.0),
|
||||
(Cockatrice, _) => (4.0, -3.5, 12.0),
|
||||
},
|
||||
feed: match (body.species, body.body_type) {
|
||||
(Chicken, _) => 1.2,
|
||||
@ -155,7 +150,6 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
||||
(Peacock, _) => 1.6,
|
||||
(Eagle, _) => 1.2,
|
||||
(Parrot, _) => 1.2,
|
||||
(Cockatrice, _) => 1.3,
|
||||
_ => 1.0,
|
||||
},
|
||||
}
|
||||
|
@ -3340,7 +3340,6 @@ impl FigureMgr {
|
||||
&mut state_animation_rate,
|
||||
skeleton_attr,
|
||||
),
|
||||
|
||||
// TODO!
|
||||
_ => anim::bird_large::IdleAnimation::update_skeleton(
|
||||
&BirdLargeSkeleton::default(),
|
||||
@ -3350,8 +3349,22 @@ impl FigureMgr {
|
||||
skeleton_attr,
|
||||
),
|
||||
};
|
||||
let target_bones = match &character {
|
||||
CharacterState::Sit { .. } => {
|
||||
anim::bird_large::FeedAnimation::update_skeleton(
|
||||
&target_base,
|
||||
time,
|
||||
state.state_time,
|
||||
&mut state_animation_rate,
|
||||
skeleton_attr,
|
||||
)
|
||||
},
|
||||
|
||||
state.skeleton = anim::vek::Lerp::lerp(&state.skeleton, &target_base, dt_lerp);
|
||||
// TODO!
|
||||
_ => target_base,
|
||||
};
|
||||
|
||||
state.skeleton = anim::vek::Lerp::lerp(&state.skeleton, &target_bones, dt_lerp);
|
||||
state.update(
|
||||
renderer,
|
||||
pos.0,
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::{column::ColumnSample, sim::SimChunk, IndexRef, CONFIG};
|
||||
use common::{
|
||||
comp::{
|
||||
biped_large, bird_medium, fish_medium, fish_small, quadruped_low, quadruped_medium,
|
||||
biped_large, bird_medium, bird_large, fish_medium, fish_small, quadruped_low, quadruped_medium,
|
||||
quadruped_small, theropod, Alignment,
|
||||
},
|
||||
generation::{ChunkSupplement, EntityInfo},
|
||||
@ -603,7 +603,7 @@ pub fn apply_wildlife_supplement<'a, R: Rng>(
|
||||
quadruped_low::Body::random_with(rng, &quadruped_low::Species::Monitor)
|
||||
.into()
|
||||
},
|
||||
2 => bird_medium::Body::random_with(rng, &bird_medium::Species::Cockatrice)
|
||||
2 => bird_large::Body::random_with(rng, &bird_large::Species::Cockatrice)
|
||||
.into(),
|
||||
3 => quadruped_small::Body::random_with(
|
||||
rng,
|
||||
|
Loading…
Reference in New Issue
Block a user