diff --git a/assets/common/npc_names.ron b/assets/common/npc_names.ron index 71d0a83499..2729cacb40 100644 --- a/assets/common/npc_names.ron +++ b/assets/common/npc_names.ron @@ -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: ( diff --git a/assets/voxygen/voxel/bird_large_central_manifest.ron b/assets/voxygen/voxel/bird_large_central_manifest.ron index 2671ef6b84..c09bbae0b3 100644 --- a/assets/voxygen/voxel/bird_large_central_manifest.ron +++ b/assets/voxygen/voxel/bird_large_central_manifest.ron @@ -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"), + ) + ), }) diff --git a/assets/voxygen/voxel/bird_large_lateral_manifest.ron b/assets/voxygen/voxel/bird_large_lateral_manifest.ron index 1f8e4ab12d..b470d45287 100644 --- a/assets/voxygen/voxel/bird_large_lateral_manifest.ron +++ b/assets/voxygen/voxel/bird_large_lateral_manifest.ron @@ -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"), + ) + ), }) \ No newline at end of file diff --git a/assets/voxygen/voxel/bird_medium_central_manifest.ron b/assets/voxygen/voxel/bird_medium_central_manifest.ron index 57d03ecfe1..d24a0be621 100644 --- a/assets/voxygen/voxel/bird_medium_central_manifest.ron +++ b/assets/voxygen/voxel/bird_medium_central_manifest.ron @@ -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"), - ) - ), }) \ No newline at end of file diff --git a/assets/voxygen/voxel/bird_medium_lateral_manifest.ron b/assets/voxygen/voxel/bird_medium_lateral_manifest.ron index 2bcb349b14..95c4027cc7 100644 --- a/assets/voxygen/voxel/bird_medium_lateral_manifest.ron +++ b/assets/voxygen/voxel/bird_medium_lateral_manifest.ron @@ -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"), - ) - ), }) \ No newline at end of file diff --git a/assets/voxygen/voxel/npc/cockatrice/male/beak.vox b/assets/voxygen/voxel/npc/cockatrice/male/beak.vox new file mode 100644 index 0000000000..9146caa0b2 --- /dev/null +++ b/assets/voxygen/voxel/npc/cockatrice/male/beak.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cce54e7acf7b0a9551c816abff099a2cf1f6ae8676fd0b016d1359a4c1f3b320 +size 1232 diff --git a/assets/voxygen/voxel/npc/cockatrice/male/chest.vox b/assets/voxygen/voxel/npc/cockatrice/male/chest.vox new file mode 100644 index 0000000000..9921765588 --- /dev/null +++ b/assets/voxygen/voxel/npc/cockatrice/male/chest.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01ec0fb420e315408a9b82df79adedc05abd081bf54659bc4a53cb500604a141 +size 6840 diff --git a/assets/voxygen/voxel/npc/cockatrice/male/foot_l.vox b/assets/voxygen/voxel/npc/cockatrice/male/foot_l.vox new file mode 100644 index 0000000000..0ea88c0ee4 --- /dev/null +++ b/assets/voxygen/voxel/npc/cockatrice/male/foot_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef58ad83fe6ee4a9d8ced58df5886b3f6144d371299bfdd8efceab65a499585c +size 1588 diff --git a/assets/voxygen/voxel/npc/cockatrice/male/foot_r.vox b/assets/voxygen/voxel/npc/cockatrice/male/foot_r.vox new file mode 100644 index 0000000000..ef46bed01d --- /dev/null +++ b/assets/voxygen/voxel/npc/cockatrice/male/foot_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6917f73529fa1631e248ef46665bcdc2811e8690678919149201b1655c57a493 +size 1588 diff --git a/assets/voxygen/voxel/npc/cockatrice/male/head.vox b/assets/voxygen/voxel/npc/cockatrice/male/head.vox index 4df45a0d07..edd8c20ca6 100644 --- a/assets/voxygen/voxel/npc/cockatrice/male/head.vox +++ b/assets/voxygen/voxel/npc/cockatrice/male/head.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5103831b0b9c38ba8d8464266aa55da2b765cc5843a083cb8ce70f4cd9242c56 -size 1952 +oid sha256:835c2e4647b95ff4b583e50932522243bc6d5ac990d0e9fd4a09bbe69f53a395 +size 3112 diff --git a/assets/voxygen/voxel/npc/cockatrice/male/leg_l.vox b/assets/voxygen/voxel/npc/cockatrice/male/leg_l.vox new file mode 100644 index 0000000000..efe2d31ed4 --- /dev/null +++ b/assets/voxygen/voxel/npc/cockatrice/male/leg_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:741ab2f771236ba57fb6d34dba6dbfc260e4ce2c664c82dc7962252afc94ff41 +size 2224 diff --git a/assets/voxygen/voxel/npc/cockatrice/male/leg_r.vox b/assets/voxygen/voxel/npc/cockatrice/male/leg_r.vox index e68e4781a1..23aca80aa3 100644 --- a/assets/voxygen/voxel/npc/cockatrice/male/leg_r.vox +++ b/assets/voxygen/voxel/npc/cockatrice/male/leg_r.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b95667bdfa3818583fa968a101f4bf39219f0488d4f7cf05f05374b7251ef3f6 -size 1364 +oid sha256:a11d94b3930ae2f50ba23f6d4c75e4d0fb590d7181e7df246c4e690babea366a +size 2224 diff --git a/assets/voxygen/voxel/npc/cockatrice/male/neck.vox b/assets/voxygen/voxel/npc/cockatrice/male/neck.vox new file mode 100644 index 0000000000..be2fc102c5 --- /dev/null +++ b/assets/voxygen/voxel/npc/cockatrice/male/neck.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd52c35cb0670f77be4ed7a8a0a23968f12db49b7487abd6a6aea78d7162d50b +size 3424 diff --git a/assets/voxygen/voxel/npc/cockatrice/male/tail.vox b/assets/voxygen/voxel/npc/cockatrice/male/tail.vox deleted file mode 100644 index dad94dedf5..0000000000 --- a/assets/voxygen/voxel/npc/cockatrice/male/tail.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0267a7da9724b1c8c6c7c2b7657d828897205af3c0c7b6d9a98861abf8f0baf8 -size 1216 diff --git a/assets/voxygen/voxel/npc/cockatrice/male/tail_front.vox b/assets/voxygen/voxel/npc/cockatrice/male/tail_front.vox new file mode 100644 index 0000000000..f045ffb594 --- /dev/null +++ b/assets/voxygen/voxel/npc/cockatrice/male/tail_front.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3bb5859c43e04522008a3961dbd804852fdd0a6d446a000d7b74934b3523ff9b +size 2056 diff --git a/assets/voxygen/voxel/npc/cockatrice/male/tail_rear.vox b/assets/voxygen/voxel/npc/cockatrice/male/tail_rear.vox new file mode 100644 index 0000000000..ddb1b2f182 --- /dev/null +++ b/assets/voxygen/voxel/npc/cockatrice/male/tail_rear.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f251fa3447de8ba97da74c703c0ad8b5892167a4ec65ae5a4ad46fa946654aab +size 1772 diff --git a/assets/voxygen/voxel/npc/cockatrice/male/torso.vox b/assets/voxygen/voxel/npc/cockatrice/male/torso.vox deleted file mode 100644 index a4c118f9b3..0000000000 --- a/assets/voxygen/voxel/npc/cockatrice/male/torso.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8fb4738f22d69176aea93efd95993f47e6a32cdd45c14435ef29bfd3f795fa46 -size 3048 diff --git a/assets/voxygen/voxel/npc/cockatrice/male/wing_in_l.vox b/assets/voxygen/voxel/npc/cockatrice/male/wing_in_l.vox new file mode 100644 index 0000000000..146351be65 --- /dev/null +++ b/assets/voxygen/voxel/npc/cockatrice/male/wing_in_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1448a9817dfae3206f6b00f67b23b8bb461c9ca05ce2855ed3532d3969fd6438 +size 1412 diff --git a/assets/voxygen/voxel/npc/cockatrice/male/wing_in_r.vox b/assets/voxygen/voxel/npc/cockatrice/male/wing_in_r.vox new file mode 100644 index 0000000000..95e2e1c4ce --- /dev/null +++ b/assets/voxygen/voxel/npc/cockatrice/male/wing_in_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0bb7d1f8a8cb4108bb1787777a59fb8cd4bfb6e21ded2707515204dadd441f91 +size 1412 diff --git a/assets/voxygen/voxel/npc/cockatrice/male/wing_mid_l.vox b/assets/voxygen/voxel/npc/cockatrice/male/wing_mid_l.vox new file mode 100644 index 0000000000..5b1dde72bb --- /dev/null +++ b/assets/voxygen/voxel/npc/cockatrice/male/wing_mid_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fff15b813df74818b29500ae5c0041532f74dbd1642845226fd775c7bf51dc13 +size 1408 diff --git a/assets/voxygen/voxel/npc/cockatrice/male/wing_mid_r.vox b/assets/voxygen/voxel/npc/cockatrice/male/wing_mid_r.vox new file mode 100644 index 0000000000..6daf0777bb --- /dev/null +++ b/assets/voxygen/voxel/npc/cockatrice/male/wing_mid_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1f1f5cb35b7026bdba42cfdc77f6cc8f505116550611e84ed41922c7a342166 +size 1408 diff --git a/assets/voxygen/voxel/npc/cockatrice/male/wing_out_l.vox b/assets/voxygen/voxel/npc/cockatrice/male/wing_out_l.vox new file mode 100644 index 0000000000..514b14ef94 --- /dev/null +++ b/assets/voxygen/voxel/npc/cockatrice/male/wing_out_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a6bd4c5688f363ec218d6a7b65da76cbf5783a4cebf27c148c865559953981e +size 1624 diff --git a/assets/voxygen/voxel/npc/cockatrice/male/wing_out_r.vox b/assets/voxygen/voxel/npc/cockatrice/male/wing_out_r.vox new file mode 100644 index 0000000000..37c70de238 --- /dev/null +++ b/assets/voxygen/voxel/npc/cockatrice/male/wing_out_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:074c1ced666ad7fcf6135d0424c12fb183aca5c022ba0e739be0bba422d5ada9 +size 1624 diff --git a/assets/voxygen/voxel/npc/cockatrice/male/wing_r.vox b/assets/voxygen/voxel/npc/cockatrice/male/wing_r.vox deleted file mode 100644 index 8ea51d1c13..0000000000 --- a/assets/voxygen/voxel/npc/cockatrice/male/wing_r.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bc0aed5d4195504288f7be8063bbb1e1058d7ae65bbd570ae97276b009c54318 -size 1212 diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs index cca0db27de..abaa7672e6 100644 --- a/common/src/comp/body.rs +++ b/common/src/comp/body.rs @@ -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, }, diff --git a/common/src/comp/body/bird_large.rs b/common/src/comp/body/bird_large.rs index 2c12eee089..3d6ac3601d 100644 --- a/common/src/comp/body/bird_large.rs +++ b/common/src/comp/body/bird_large.rs @@ -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 { pub phoenix: SpeciesMeta, + pub cockatrice: SpeciesMeta, } impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies { @@ -53,11 +55,15 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies 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 { type IntoIter = std::iter::Copied>; diff --git a/common/src/comp/body/bird_medium.rs b/common/src/comp/body/bird_medium.rs index 264e6abf05..5eb7dbee65 100644 --- a/common/src/comp/body/bird_medium.rs +++ b/common/src/comp/body/bird_medium.rs @@ -41,7 +41,6 @@ make_case_elim!( Eagle = 4, Owl = 5, Parrot = 6, - Cockatrice = 7, } ); @@ -57,7 +56,6 @@ pub struct AllSpecies { pub eagle: SpeciesMeta, pub owl: SpeciesMeta, pub parrot: SpeciesMeta, - pub cockatrice: SpeciesMeta, } impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies { @@ -73,12 +71,11 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies 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 { diff --git a/voxygen/anim/src/bird_large/feed.rs b/voxygen/anim/src/bird_large/feed.rs new file mode 100644 index 0000000000..3626fac9f1 --- /dev/null +++ b/voxygen/anim/src/bird_large/feed.rs @@ -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 + } +} diff --git a/voxygen/anim/src/bird_large/fly.rs b/voxygen/anim/src/bird_large/fly.rs index 37fa3b7068..eb30962272 100644 --- a/voxygen/anim/src/bird_large/fly.rs +++ b/voxygen/anim/src/bird_large/fly.rs @@ -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,18 +156,18 @@ 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 + 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 + 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(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(slow * -0.05); } - 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_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.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_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 } } diff --git a/voxygen/anim/src/bird_large/idle.rs b/voxygen/anim/src/bird_large/idle.rs index d7e96d74f2..29947a21b2 100644 --- a/voxygen/anim/src/bird_large/idle.rs +++ b/voxygen/anim/src/bird_large/idle.rs @@ -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); diff --git a/voxygen/anim/src/bird_large/mod.rs b/voxygen/anim/src/bird_large/mod.rs index d0a086bca4..9c7e190c58 100644 --- a/voxygen/anim/src/bird_large/mod.rs +++ b/voxygen/anim/src/bird_large/mod.rs @@ -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::::from(self.wing_out_r); let leg_l_mat = chest_mat * Mat4::::from(self.leg_l); let leg_r_mat = chest_mat * Mat4::::from(self.leg_r); - let foot_l_mat = chest_mat * Mat4::::from(self.leg_l); - let foot_r_mat = chest_mat * Mat4::::from(self.leg_r); + let foot_l_mat = leg_l_mat * Mat4::::from(self.foot_l); + let foot_r_mat = leg_r_mat * Mat4::::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), }, } } diff --git a/voxygen/anim/src/bird_large/run.rs b/voxygen/anim/src/bird_large/run.rs index ab5fd3a4d9..0243871d25 100644 --- a/voxygen/anim/src/bird_large/run.rs +++ b/voxygen/anim/src/bird_large/run.rs @@ -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 } diff --git a/voxygen/anim/src/bird_medium/mod.rs b/voxygen/anim/src/bird_medium/mod.rs index 8bffda2e5a..ab72ea8173 100644 --- a/voxygen/anim/src/bird_medium/mod.rs +++ b/voxygen/anim/src/bird_medium/mod.rs @@ -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, }, } diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index a74a4e3b5a..b243d73c7b 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -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, diff --git a/world/src/layer/wildlife.rs b/world/src/layer/wildlife.rs index abd7cda7d6..0bdef79828 100644 --- a/world/src/layer/wildlife.rs +++ b/world/src/layer/wildlife.rs @@ -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,