diff --git a/assets/common/npc_names.json b/assets/common/npc_names.json index 7807251c42..f97abf5008 100644 --- a/assets/common/npc_names.json +++ b/assets/common/npc_names.json @@ -629,6 +629,10 @@ "pangolin": { "keyword": "pangolin", "generic": "Pangolin" + }, + "maneater": { + "keyword": "maneater", + "generic": "Maneater" } } } diff --git a/assets/voxygen/voxel/npc/maneater/male/chest.vox b/assets/voxygen/voxel/npc/maneater/male/chest.vox new file mode 100644 index 0000000000..5f84a6a1ed --- /dev/null +++ b/assets/voxygen/voxel/npc/maneater/male/chest.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e6c07bc69f792c5ceca945fefdd3b718ef8223f8f9f63aba9ecd4b05b2f39a6 +size 4676 diff --git a/assets/voxygen/voxel/npc/maneater/male/foot_bl.vox b/assets/voxygen/voxel/npc/maneater/male/foot_bl.vox new file mode 100644 index 0000000000..1e351d142f --- /dev/null +++ b/assets/voxygen/voxel/npc/maneater/male/foot_bl.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63f8b9c9811b7b1eaa5368793014431fb6bd329a6117c19646ccdf300dbd3b15 +size 1648 diff --git a/assets/voxygen/voxel/npc/maneater/male/foot_br.vox b/assets/voxygen/voxel/npc/maneater/male/foot_br.vox new file mode 100644 index 0000000000..746ecdf96f --- /dev/null +++ b/assets/voxygen/voxel/npc/maneater/male/foot_br.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f6d31b0d8bfd7856c730fee8a1da2470452003f1f9cb7411506d9354e26b320 +size 1648 diff --git a/assets/voxygen/voxel/npc/maneater/male/foot_fl.vox b/assets/voxygen/voxel/npc/maneater/male/foot_fl.vox new file mode 100644 index 0000000000..677939e776 --- /dev/null +++ b/assets/voxygen/voxel/npc/maneater/male/foot_fl.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37e29cbcc2ed259549c83ad0bfb2f55cb78c649eecc72e0e96f6c8789bd8fe3a +size 1648 diff --git a/assets/voxygen/voxel/npc/maneater/male/foot_fr.vox b/assets/voxygen/voxel/npc/maneater/male/foot_fr.vox new file mode 100644 index 0000000000..30212e2e49 --- /dev/null +++ b/assets/voxygen/voxel/npc/maneater/male/foot_fr.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0622a6997ed3f18f9b70d24a382f9d1d582b3cca430a0ee433fd7f71d0c6a3b +size 1648 diff --git a/assets/voxygen/voxel/npc/maneater/male/head_lower.vox b/assets/voxygen/voxel/npc/maneater/male/head_lower.vox new file mode 100644 index 0000000000..fb5f0a789e --- /dev/null +++ b/assets/voxygen/voxel/npc/maneater/male/head_lower.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c7e37a8a73a1b6f5551022e4c7b7d0bd9ea5cf1b5637cd6d4af6ddef9af3a32 +size 3064 diff --git a/assets/voxygen/voxel/npc/maneater/male/head_upper.vox b/assets/voxygen/voxel/npc/maneater/male/head_upper.vox new file mode 100644 index 0000000000..38d6ebdbaf --- /dev/null +++ b/assets/voxygen/voxel/npc/maneater/male/head_upper.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35da859bff5c8d59e1c38e3b1de823f32b70fdd06fb2cf2b904a2fdbdeb077b0 +size 1744 diff --git a/assets/voxygen/voxel/npc/maneater/male/jaw.vox b/assets/voxygen/voxel/npc/maneater/male/jaw.vox new file mode 100644 index 0000000000..b3b1cfa502 --- /dev/null +++ b/assets/voxygen/voxel/npc/maneater/male/jaw.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:428c973ed7e3806c0494419c4628ce326bd86760a8434cee10a98ac7cac9343d +size 5980 diff --git a/assets/voxygen/voxel/npc/maneater/male/tail_front.vox b/assets/voxygen/voxel/npc/maneater/male/tail_front.vox new file mode 100644 index 0000000000..429d56c39b --- /dev/null +++ b/assets/voxygen/voxel/npc/maneater/male/tail_front.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:baad7f1d7cc8c5f38b7777a0d1bab6e1c7c3651ede9d42f96b16abddaa92d374 +size 1668 diff --git a/assets/voxygen/voxel/npc/maneater/male/tail_rear.vox b/assets/voxygen/voxel/npc/maneater/male/tail_rear.vox new file mode 100644 index 0000000000..4446447579 --- /dev/null +++ b/assets/voxygen/voxel/npc/maneater/male/tail_rear.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:213dfc75204d14fe7304a79d7a221e460c6a54324d2ac57f61bfb633cc959566 +size 1288 diff --git a/assets/voxygen/voxel/quadruped_low_central_manifest.ron b/assets/voxygen/voxel/quadruped_low_central_manifest.ron index 727f31ee13..5df288e77b 100644 --- a/assets/voxygen/voxel/quadruped_low_central_manifest.ron +++ b/assets/voxygen/voxel/quadruped_low_central_manifest.ron @@ -416,4 +416,56 @@ central: ("npc.pangolin.male.tail_front"), ), ), + (Maneater, Male): ( + upper: ( + offset: (-5.5, 0.0, 0.0), + central: ("npc.maneater.male.head_upper"), + ), + lower: ( + offset: (-14.5, -5.5, -0.0), + central: ("npc.maneater.male.head_lower"), + ), + jaw: ( + offset: (-7.5, 0.0, -19.0), + central: ("npc.maneater.male.jaw"), + ), + chest: ( + offset: (-6.5, -6.5, -6.0), + central: ("npc.maneater.male.chest"), + ), + tail_rear: ( + offset: (-0.5, -14.0, -6.5), + central: ("npc.maneater.male.tail_rear"), + ), + tail_front: ( + offset: (-4.5, -15.0, -0.0), + central: ("npc.maneater.male.tail_front"), + ), + ), + (Maneater, Female): ( + upper: ( + offset: (-5.5, 0.0, 0.0), + central: ("npc.maneater.male.head_upper"), + ), + lower: ( + offset: (-14.5, -5.5, -0.0), + central: ("npc.maneater.male.head_lower"), + ), + jaw: ( + offset: (-7.5, 0.0, -19.0), + central: ("npc.maneater.male.jaw"), + ), + chest: ( + offset: (-6.5, -6.5, -6.0), + central: ("npc.maneater.male.chest"), + ), + tail_rear: ( + offset: (-0.5, -14.0, -6.5), + central: ("npc.maneater.male.tail_rear"), + ), + tail_front: ( + offset: (-4.5, -15.0, -0.0), + central: ("npc.maneater.male.tail_front"), + ), + ), }) diff --git a/assets/voxygen/voxel/quadruped_low_lateral_manifest.ron b/assets/voxygen/voxel/quadruped_low_lateral_manifest.ron index c02fc81839..bdeee26027 100644 --- a/assets/voxygen/voxel/quadruped_low_lateral_manifest.ron +++ b/assets/voxygen/voxel/quadruped_low_lateral_manifest.ron @@ -287,4 +287,40 @@ lateral: ("npc.pangolin.male.foot_br"), ), ), + (Maneater, Male): ( + front_left: ( + offset: (-6.0, 0.0, -6.5), + lateral: ("npc.maneater.male.foot_fl"), + ), + front_right: ( + offset: (-2.0, 0.0, -6.5), + lateral: ("npc.maneater.male.foot_fr"), + ), + back_left: ( + offset: (-6.0, -8.0, -9.0), + lateral: ("npc.maneater.male.foot_bl"), + ), + back_right: ( + offset: (-2.0, -8.0, -9.0), + lateral: ("npc.maneater.male.foot_br"), + ), + ), + (Maneater, Female): ( + front_left: ( + offset: (-6.0, 0.0, -6.5), + lateral: ("npc.maneater.male.foot_fl"), + ), + front_right: ( + offset: (-2.0, 0.0, -6.5), + lateral: ("npc.maneater.male.foot_fr"), + ), + back_left: ( + offset: (-6.0, -8.0, -9.0), + lateral: ("npc.maneater.male.foot_bl"), + ), + back_right: ( + offset: (-2.0, -8.0, -9.0), + lateral: ("npc.maneater.male.foot_br"), + ), + ), }) diff --git a/common/src/comp/body/biped_large.rs b/common/src/comp/body/biped_large.rs index 524807a21f..5b90048c59 100644 --- a/common/src/comp/body/biped_large.rs +++ b/common/src/comp/body/biped_large.rs @@ -60,7 +60,7 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies } pub const ALL_SPECIES: [Species; 4] = [ - Species::Ogre, + Species::Ogre, Species::Cyclops, Species::Wendigo, Species::Troll, diff --git a/common/src/comp/body/quadruped_low.rs b/common/src/comp/body/quadruped_low.rs index de08a7da58..ceac93e830 100644 --- a/common/src/comp/body/quadruped_low.rs +++ b/common/src/comp/body/quadruped_low.rs @@ -36,6 +36,7 @@ pub enum Species { Tortoise = 5, Rocksnapper = 6, Pangolin = 7, + Maneater = 8, } /// Data representing per-species generic data. @@ -51,6 +52,7 @@ pub struct AllSpecies { pub tortoise: SpeciesMeta, pub rocksnapper: SpeciesMeta, pub pangolin: SpeciesMeta, + pub maneater: SpeciesMeta, } impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies { @@ -67,11 +69,12 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies Species::Tortoise => &self.tortoise, Species::Rocksnapper => &self.rocksnapper, Species::Pangolin => &self.pangolin, + Species::Maneater => &self.maneater, } } } -pub const ALL_SPECIES: [Species; 8] = [ +pub const ALL_SPECIES: [Species; 9] = [ Species::Crocodile, Species::Alligator, Species::Salamander, @@ -80,6 +83,7 @@ pub const ALL_SPECIES: [Species; 8] = [ Species::Tortoise, Species::Rocksnapper, Species::Pangolin, + Species::Maneater, ]; impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies { diff --git a/common/src/states/utils.rs b/common/src/states/utils.rs index 56579e72c3..bd2b91b5cb 100644 --- a/common/src/states/utils.rs +++ b/common/src/states/utils.rs @@ -148,7 +148,7 @@ pub fn attempt_wield(data: &JoinData, update: &mut StateUpdate) { /// Checks that player can `Sit` and updates `CharacterState` if so pub fn attempt_sit(data: &JoinData, update: &mut StateUpdate) { - if data.physics.on_ground && data.body.is_humanoid() { + if data.physics.on_ground { update.character = CharacterState::Sit; } } diff --git a/voxygen/src/anim/src/quadruped_low/mod.rs b/voxygen/src/anim/src/quadruped_low/mod.rs index 3bf99f64fc..577ce0acac 100644 --- a/voxygen/src/anim/src/quadruped_low/mod.rs +++ b/voxygen/src/anim/src/quadruped_low/mod.rs @@ -142,6 +142,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr { (Tortoise, _) => (5.0, 1.0), (Rocksnapper, _) => (6.0, 0.5), (Pangolin, _) => (-0.5, 8.0), + (Maneater, _) => (6.0, 9.5), }, head_lower: match (body.species, body.body_type) { (Crocodile, _) => (8.0, 0.0), @@ -152,6 +153,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr { (Tortoise, _) => (12.0, -3.5), (Rocksnapper, _) => (12.0, -9.0), (Pangolin, _) => (8.0, -9.0), + (Maneater, _) => (1.0, 4.5), }, jaw: match (body.species, body.body_type) { (Crocodile, _) => (2.5, -3.0), @@ -162,6 +164,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr { (Tortoise, _) => (-3.5, -2.0), (Rocksnapper, _) => (-5.0, -1.5), (Pangolin, _) => (0.0, 0.0), + (Maneater, _) => (-1.0, 4.0), }, chest: match (body.species, body.body_type) { (Crocodile, _) => (0.0, 5.0), @@ -172,6 +175,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr { (Tortoise, _) => (0.0, 11.0), (Rocksnapper, _) => (0.0, 18.5), (Pangolin, _) => (0.0, 7.0), + (Maneater, _) => (0.0, 12.0), }, tail_rear: match (body.species, body.body_type) { (Crocodile, _) => (-12.5, -1.0), @@ -182,6 +186,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr { (Tortoise, _) => (-10.0, -1.5), (Rocksnapper, _) => (-14.5, -2.0), (Pangolin, _) => (-7.0, -3.0), + (Maneater, _) => (-15.0, 4.0), }, tail_front: match (body.species, body.body_type) { (Crocodile, _) => (-6.0, 0.0), @@ -192,6 +197,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr { (Tortoise, _) => (-13.0, -3.5), (Rocksnapper, _) => (-13.5, -6.5), (Pangolin, _) => (-7.5, -0.5), + (Maneater, _) => (-1.0, 4.0), }, feet_f: match (body.species, body.body_type) { (Crocodile, _) => (3.5, 6.0, -1.0), @@ -202,6 +208,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr { (Tortoise, _) => (5.5, 6.5, -3.0), (Rocksnapper, _) => (7.5, 5.0, -8.5), (Pangolin, _) => (5.5, 5.5, -1.0), + (Maneater, _) => (4.5, 4.0, -5.5), }, feet_b: match (body.species, body.body_type) { (Crocodile, _) => (3.5, -6.0, -1.0), @@ -212,6 +219,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr { (Tortoise, _) => (5.5, -11.5, -3.0), (Rocksnapper, _) => (8.0, -12.0, -9.5), (Pangolin, _) => (6.5, -3.5, -1.0), + (Maneater, _) => (4.5, -2.5, -3.0), }, lean: match (body.species, body.body_type) { (Pangolin, _) => (0.4, 0.0), @@ -226,6 +234,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr { (Tortoise, _) => (1.0), (Rocksnapper, _) => (1.4), (Pangolin, _) => (1.3), + (Maneater, _) => (1.4), }, tempo: match (body.species, body.body_type) { (Crocodile, _) => (0.8), @@ -236,6 +245,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr { (Tortoise, _) => (0.9), (Rocksnapper, _) => (0.9), (Pangolin, _) => (1.15), + (Maneater, _) => (1.0), }, } } diff --git a/voxygen/src/anim/src/quadruped_low/run.rs b/voxygen/src/anim/src/quadruped_low/run.rs index 7d7df6561b..a71979ee24 100644 --- a/voxygen/src/anim/src/quadruped_low/run.rs +++ b/voxygen/src/anim/src/quadruped_low/run.rs @@ -107,7 +107,7 @@ impl Animation for RunAnimation { skeleton_attr.tail_front.1 + skeleton_attr.lean.0 * 2.0, ); next.tail_front.ori = - Quaternion::rotation_z(shortalt * 0.18 * skeleton_attr.lean.0 + tilt * 1.8) + Quaternion::rotation_z(shortalt * 0.18 * skeleton_attr.lean.1 + tilt * 1.8) * Quaternion::rotation_y(shortalt * 0.1) * Quaternion::rotation_x(0.06 - skeleton_attr.lean.0 * 1.2 + x_tilt * 0.2); next.tail_front.scale = Vec3::one(); @@ -118,7 +118,7 @@ impl Animation for RunAnimation { skeleton_attr.tail_rear.1 + shortalt * 0.6, ); next.tail_rear.ori = - Quaternion::rotation_z(shortalt * 0.25 * skeleton_attr.lean.0 + tilt * 1.6) + Quaternion::rotation_z(shortalt * 0.25 * skeleton_attr.lean.1 + tilt * 1.6) * Quaternion::rotation_y(shortalt * 0.1) * Quaternion::rotation_x(-0.04 + x_tilt * 0.5); next.tail_rear.scale = Vec3::one(); @@ -156,7 +156,7 @@ impl Animation for RunAnimation { next.foot_bl.offset = Vec3::new( -skeleton_attr.feet_b.0, skeleton_attr.feet_b.1 + foothorilb * -1.0, - skeleton_attr.feet_b.2 + 1.0 + ((footvertlb * -1.2).max(-0.0)), + skeleton_attr.feet_b.2 + ((footvertlb * -1.2).max(-0.0)), ); next.foot_bl.ori = Quaternion::rotation_x(-0.2 + footvertlb * -0.5 - skeleton_attr.lean.0) * Quaternion::rotation_y(tilt * -1.0) @@ -166,7 +166,7 @@ impl Animation for RunAnimation { next.foot_br.offset = Vec3::new( skeleton_attr.feet_b.0, skeleton_attr.feet_b.1 + foothorirb * -1.0, - skeleton_attr.feet_b.2 + 1.0 + ((footvertrb * -1.2).max(-0.0)), + skeleton_attr.feet_b.2 + ((footvertrb * -1.2).max(-0.0)), ); next.foot_br.ori = Quaternion::rotation_x(-0.2 + footvertrb * -0.5 - skeleton_attr.lean.0) * Quaternion::rotation_y(tilt * -1.0) diff --git a/voxygen/src/anim/src/quadruped_small/feed.rs b/voxygen/src/anim/src/quadruped_small/feed.rs new file mode 100644 index 0000000000..aa4de97cb3 --- /dev/null +++ b/voxygen/src/anim/src/quadruped_small/feed.rs @@ -0,0 +1,100 @@ +use super::{super::Animation, QuadrupedSmallSkeleton, SkeletonAttr}; +use std::{f32::consts::PI, ops::Mul}; +use vek::*; + +pub struct FeedAnimation; + +impl Animation for FeedAnimation { + type Dependency = f64; + type Skeleton = QuadrupedSmallSkeleton; + + #[cfg(feature = "use-dyn-lib")] + const UPDATE_FN: &'static [u8] = b"quadruped_small_feed\0"; + + #[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_small_feed")] + fn update_skeleton_inner( + skeleton: &Self::Skeleton, + global_time: Self::Dependency, + anim_time: f64, + _rate: &mut f32, + skeleton_attr: &SkeletonAttr, + ) -> Self::Skeleton { + let mut next = (*skeleton).clone(); + + let slow = (anim_time as f32 * 5.0).sin(); + let quick = (anim_time as f32 * 14.0).sin(); + + let slow_alt = (anim_time as f32 * 3.5 + PI).sin(); + + let head_look = Vec2::new( + ((global_time + anim_time) as f32 / 2.0) + .floor() + .mul(7331.0) + .sin() + * 1.0, + ((global_time + anim_time) as f32 / 2.0) + .floor() + .mul(1337.0) + .sin() + * 0.5, + ); + + next.head.offset = Vec3::new( + 0.0, + skeleton_attr.head.0 + 1.5, + skeleton_attr.head.1 + slow * 0.2, + ); + next.head.ori = Quaternion::rotation_z(head_look.y) + * Quaternion::rotation_x(slow * 0.05 + quick * 0.08 - 0.4 * skeleton_attr.feed); + next.head.scale = Vec3::one(); + + next.chest.offset = Vec3::new(slow * 0.02, skeleton_attr.chest.0, skeleton_attr.chest.1) + / 11.0 + * skeleton_attr.scaler; + next.chest.ori = Quaternion::rotation_x(-0.35 * skeleton_attr.feed) + * Quaternion::rotation_y(head_look.y * 0.1); + next.chest.scale = Vec3::one() / 11.0 * skeleton_attr.scaler; + + next.leg_fl.offset = Vec3::new( + -skeleton_attr.feet_f.0, + skeleton_attr.feet_f.1, + skeleton_attr.feet_f.2 + 0.5, + ); + next.leg_fl.ori = Quaternion::rotation_x(slow * 0.01 + 0.25 * skeleton_attr.feed) + * Quaternion::rotation_y(slow * -0.02 - head_look.y * 0.1); + next.leg_fl.scale = Vec3::one(); + + next.leg_fr.offset = Vec3::new( + skeleton_attr.feet_f.0, + skeleton_attr.feet_f.1, + skeleton_attr.feet_f.2 + 0.5, + ); + next.leg_fr.ori = Quaternion::rotation_x(slow_alt * 0.01 + 0.25 * skeleton_attr.feed) + * Quaternion::rotation_y(slow * -0.02 - head_look.y * 0.1); + next.leg_fr.scale = Vec3::one(); + + next.leg_bl.offset = Vec3::new( + -skeleton_attr.feet_b.0, + skeleton_attr.feet_b.1 + 1.0, + skeleton_attr.feet_b.2 - 1.0, + ); + next.leg_bl.ori = Quaternion::rotation_x(slow_alt * 0.01 + 0.15 * skeleton_attr.feed) + * Quaternion::rotation_y(slow * -0.02 - head_look.y * 0.1); + next.leg_bl.scale = Vec3::one(); + + next.leg_br.offset = Vec3::new( + skeleton_attr.feet_b.0, + skeleton_attr.feet_b.1 + 1.0, + skeleton_attr.feet_b.2 - 1.0, + ); + next.leg_br.ori = Quaternion::rotation_x(slow * 0.01 + 0.15 * skeleton_attr.feed) + * Quaternion::rotation_y(slow * -0.02 - head_look.y * 0.1); + next.leg_br.scale = Vec3::one(); + + next.tail.offset = Vec3::new(0.0, skeleton_attr.tail.0, skeleton_attr.tail.1); + next.tail.ori = Quaternion::rotation_z(slow * 0.3 + head_look.y * 0.3); + next.tail.scale = Vec3::one(); + + next + } +} diff --git a/voxygen/src/anim/src/quadruped_small/mod.rs b/voxygen/src/anim/src/quadruped_small/mod.rs index 4665e928a4..5753307496 100644 --- a/voxygen/src/anim/src/quadruped_small/mod.rs +++ b/voxygen/src/anim/src/quadruped_small/mod.rs @@ -1,9 +1,10 @@ +pub mod feed; pub mod idle; pub mod jump; pub mod run; // Reexports -pub use self::{idle::IdleAnimation, jump::JumpAnimation, run::RunAnimation}; +pub use self::{feed::FeedAnimation, idle::IdleAnimation, jump::JumpAnimation, run::RunAnimation}; use super::{Bone, FigureBoneData, Skeleton}; use common::comp::{self}; @@ -80,6 +81,7 @@ pub struct SkeletonAttr { maximize: f32, minimize: f32, spring: f32, + feed: f32, } impl<'a> std::convert::TryFrom<&'a comp::Body> for SkeletonAttr { type Error = (); @@ -105,6 +107,7 @@ impl Default for SkeletonAttr { maximize: 0.0, minimize: 0.0, spring: 0.0, + feed: 0.0, } } } @@ -149,7 +152,7 @@ impl<'a> From<&'a comp::quadruped_small::Body> for SkeletonAttr { }, feet_f: match (body.species, body.body_type) { (Pig, _) => (4.5, 3.0, -2.0), - (Fox, _) => (3.0, 5.0, -5.0), + (Fox, _) => (3.0, 5.0, -5.5), (Sheep, _) => (3.5, 2.0, -2.0), (Boar, _) => (3.5, 6.0, -5.5), (Jackalope, _) => (3.0, 4.0, -2.0), @@ -166,7 +169,7 @@ impl<'a> From<&'a comp::quadruped_small::Body> for SkeletonAttr { }, feet_b: match (body.species, body.body_type) { (Pig, _) => (3.5, -2.0, -1.5), - (Fox, _) => (3.0, -3.0, -2.0), + (Fox, _) => (3.0, -3.0, -3.0), (Sheep, _) => (3.5, -3.5, -2.0), (Boar, _) => (3.0, -3.0, -2.5), (Jackalope, _) => (3.5, -2.0, 0.0), @@ -283,6 +286,23 @@ impl<'a> From<&'a comp::quadruped_small::Body> for SkeletonAttr { (Rabbit, _) => (2.5), (Truffler, _) => (0.8), }, + feed: match (body.species, body.body_type) { + (Pig, _) => (1.0), + (Fox, _) => (1.0), + (Sheep, _) => (1.0), + (Boar, _) => (0.6), + (Jackalope, _) => (1.0), + (Skunk, _) => (0.8), + (Cat, _) => (1.0), + (Batfox, _) => (0.7), + (Raccoon, _) => (0.8), + (Quokka, _) => (1.0), + (Dodarock, _) => (0.7), + (Holladon, _) => (1.0), + (Hyena, _) => (1.0), + (Rabbit, _) => (1.2), + (Truffler, _) => (0.6), + }, } } } diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index 923abac39b..8af00917bf 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -947,11 +947,29 @@ impl FigureMgr { &mut state_animation_rate, skeleton_attr, ), + _ => anim::quadruped_small::IdleAnimation::update_skeleton( + &QuadrupedSmallSkeleton::new(), + time, + state.state_time, + &mut state_animation_rate, + skeleton_attr, + ), + }; + let target_bones = match &character { + CharacterState::Sit { .. } => { + anim::quadruped_small::FeedAnimation::update_skeleton( + &target_base, + time, + state.state_time, + &mut state_animation_rate, + skeleton_attr, + ) + }, // TODO! - _ => state.skeleton_mut().clone(), + _ => target_base, }; - state.skeleton.interpolate(&target_base, dt); + state.skeleton.interpolate(&target_bones, dt); state.update( renderer, pos.0,