diff --git a/assets/common/npc_names.json b/assets/common/npc_names.json index 5c59168cb5..fe241ac5f3 100644 --- a/assets/common/npc_names.json +++ b/assets/common/npc_names.json @@ -601,6 +601,10 @@ "rocksnapper": { "keyword": "rocksnapper", "generic": "Rock Snapper" + }, + "pangolin": { + "keyword": "pangolin", + "generic": "Pangolin" } } } diff --git a/assets/voxygen/voxel/npc/pangolin/female/chest.vox b/assets/voxygen/voxel/npc/pangolin/female/chest.vox new file mode 100644 index 0000000000..e6807d4371 --- /dev/null +++ b/assets/voxygen/voxel/npc/pangolin/female/chest.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30049bfcf832f993e06fb886b1e1767b616676f19527cfc518dc7040da1469fc +size 5760 diff --git a/assets/voxygen/voxel/npc/pangolin/female/foot_bl.vox b/assets/voxygen/voxel/npc/pangolin/female/foot_bl.vox new file mode 100644 index 0000000000..c681fcb79a --- /dev/null +++ b/assets/voxygen/voxel/npc/pangolin/female/foot_bl.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23d913c7362393ce0e7a4f430fd3119e2c28382131fcfc414c980f0336a20a4b +size 1304 diff --git a/assets/voxygen/voxel/npc/pangolin/female/foot_br.vox b/assets/voxygen/voxel/npc/pangolin/female/foot_br.vox new file mode 100644 index 0000000000..0f4c55f657 --- /dev/null +++ b/assets/voxygen/voxel/npc/pangolin/female/foot_br.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e2ede7330638d0cda25ab1387694ad3e3c6b5f8743a01fe2825461e33c92434 +size 1304 diff --git a/assets/voxygen/voxel/npc/pangolin/female/foot_fl.vox b/assets/voxygen/voxel/npc/pangolin/female/foot_fl.vox new file mode 100644 index 0000000000..bb5ea8f938 --- /dev/null +++ b/assets/voxygen/voxel/npc/pangolin/female/foot_fl.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9866eca621da6b6ee3c90d57d3bdae7fca62d6660fea73ddb6414ab1ed1bac7f +size 1252 diff --git a/assets/voxygen/voxel/npc/pangolin/female/foot_fr.vox b/assets/voxygen/voxel/npc/pangolin/female/foot_fr.vox new file mode 100644 index 0000000000..606298810f --- /dev/null +++ b/assets/voxygen/voxel/npc/pangolin/female/foot_fr.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e343e9facc968a9c4b67199101dd307d78cf892506cd5d7881ae269ce83c3c37 +size 1252 diff --git a/assets/voxygen/voxel/npc/pangolin/female/head_upper.vox b/assets/voxygen/voxel/npc/pangolin/female/head_upper.vox new file mode 100644 index 0000000000..21af2115c2 --- /dev/null +++ b/assets/voxygen/voxel/npc/pangolin/female/head_upper.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:739ded84aca35644e2186bb091368262b97fda1b07e01caaa1c4d5fe6d6bc63b +size 1468 diff --git a/assets/voxygen/voxel/npc/pangolin/female/tail_front.vox b/assets/voxygen/voxel/npc/pangolin/female/tail_front.vox new file mode 100644 index 0000000000..6272856f14 --- /dev/null +++ b/assets/voxygen/voxel/npc/pangolin/female/tail_front.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0c371f854f72c745c81ebb6073582f104901838c16f05c1aa43232769479782 +size 1776 diff --git a/assets/voxygen/voxel/npc/pangolin/female/tail_rear.vox b/assets/voxygen/voxel/npc/pangolin/female/tail_rear.vox new file mode 100644 index 0000000000..9ec835e41b --- /dev/null +++ b/assets/voxygen/voxel/npc/pangolin/female/tail_rear.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3867d64fc95d6462eb0a992b0dd823cfb9e3edea8d37f38e302cd5d6588bdd2 +size 1620 diff --git a/assets/voxygen/voxel/npc/pangolin/male/chest.vox b/assets/voxygen/voxel/npc/pangolin/male/chest.vox new file mode 100644 index 0000000000..e6807d4371 --- /dev/null +++ b/assets/voxygen/voxel/npc/pangolin/male/chest.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30049bfcf832f993e06fb886b1e1767b616676f19527cfc518dc7040da1469fc +size 5760 diff --git a/assets/voxygen/voxel/npc/pangolin/male/foot_bl.vox b/assets/voxygen/voxel/npc/pangolin/male/foot_bl.vox new file mode 100644 index 0000000000..c681fcb79a --- /dev/null +++ b/assets/voxygen/voxel/npc/pangolin/male/foot_bl.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23d913c7362393ce0e7a4f430fd3119e2c28382131fcfc414c980f0336a20a4b +size 1304 diff --git a/assets/voxygen/voxel/npc/pangolin/male/foot_br.vox b/assets/voxygen/voxel/npc/pangolin/male/foot_br.vox new file mode 100644 index 0000000000..0f4c55f657 --- /dev/null +++ b/assets/voxygen/voxel/npc/pangolin/male/foot_br.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e2ede7330638d0cda25ab1387694ad3e3c6b5f8743a01fe2825461e33c92434 +size 1304 diff --git a/assets/voxygen/voxel/npc/pangolin/male/foot_fl.vox b/assets/voxygen/voxel/npc/pangolin/male/foot_fl.vox new file mode 100644 index 0000000000..bb5ea8f938 --- /dev/null +++ b/assets/voxygen/voxel/npc/pangolin/male/foot_fl.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9866eca621da6b6ee3c90d57d3bdae7fca62d6660fea73ddb6414ab1ed1bac7f +size 1252 diff --git a/assets/voxygen/voxel/npc/pangolin/male/foot_fr.vox b/assets/voxygen/voxel/npc/pangolin/male/foot_fr.vox new file mode 100644 index 0000000000..606298810f --- /dev/null +++ b/assets/voxygen/voxel/npc/pangolin/male/foot_fr.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e343e9facc968a9c4b67199101dd307d78cf892506cd5d7881ae269ce83c3c37 +size 1252 diff --git a/assets/voxygen/voxel/npc/pangolin/male/head_upper.vox b/assets/voxygen/voxel/npc/pangolin/male/head_upper.vox new file mode 100644 index 0000000000..21af2115c2 --- /dev/null +++ b/assets/voxygen/voxel/npc/pangolin/male/head_upper.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:739ded84aca35644e2186bb091368262b97fda1b07e01caaa1c4d5fe6d6bc63b +size 1468 diff --git a/assets/voxygen/voxel/npc/pangolin/male/tail_front.vox b/assets/voxygen/voxel/npc/pangolin/male/tail_front.vox new file mode 100644 index 0000000000..6272856f14 --- /dev/null +++ b/assets/voxygen/voxel/npc/pangolin/male/tail_front.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0c371f854f72c745c81ebb6073582f104901838c16f05c1aa43232769479782 +size 1776 diff --git a/assets/voxygen/voxel/npc/pangolin/male/tail_rear.vox b/assets/voxygen/voxel/npc/pangolin/male/tail_rear.vox new file mode 100644 index 0000000000..9ec835e41b --- /dev/null +++ b/assets/voxygen/voxel/npc/pangolin/male/tail_rear.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3867d64fc95d6462eb0a992b0dd823cfb9e3edea8d37f38e302cd5d6588bdd2 +size 1620 diff --git a/assets/voxygen/voxel/quadruped_low_central_manifest.ron b/assets/voxygen/voxel/quadruped_low_central_manifest.ron index bb74fa8f02..1799bc1456 100644 --- a/assets/voxygen/voxel/quadruped_low_central_manifest.ron +++ b/assets/voxygen/voxel/quadruped_low_central_manifest.ron @@ -17,11 +17,11 @@ central: ("npc.crocodile.male.chest"), ), tail_rear: ( - offset: (-1.0, -9.0, -1.5), + offset: (-1.0, -9.0, -1.5),//full length of y dimension central: ("npc.crocodile.male.tail_rear"), ), tail_front: ( - offset: (-3.0, -13.0, -2.5), + offset: (-3.0, -13.0, -2.5),//full length of y dimension central: ("npc.crocodile.male.tail_front"), ), ), @@ -364,4 +364,56 @@ central: ("npc.rocksnapper.female.tail_front"), ), ), + (Pangolin, Male): ( + upper: ( + offset: (-2.5, 0.0, -3.0), + central: ("npc.pangolin.male.head_upper"), + ), + lower: ( + offset: (0.0, 0.0, 0.0), + central: ("armor.empty"), + ), + jaw: ( + offset: (0.0, 0.0, 0.0), + central: ("armor.empty"), + ), + chest: ( + offset: (-6.5, -8.0, -4.5), + central: ("npc.pangolin.male.chest"), + ), + tail_rear: ( + offset: (-3.5, -16.0, -1.5), + central: ("npc.pangolin.male.tail_rear"), + ), + tail_front: ( + offset: (-4.5, -8.0, -4.0), + central: ("npc.pangolin.male.tail_front"), + ), + ), + (Pangolin, Female): ( + upper: ( + offset: (-2.5, 0.0, -3.0), + central: ("npc.pangolin.female.head_upper"), + ), + lower: ( + offset: (0.0, 0.0, 0.0), + central: ("armor.empty"), + ), + jaw: ( + offset: (0.0, 0.0, 0.0), + central: ("armor.empty"), + ), + chest: ( + offset: (-6.5, -8.0, -4.5), + central: ("npc.pangolin.female.chest"), + ), + tail_rear: ( + offset: (-3.5, -16.0, -1.5), + central: ("npc.pangolin.female.tail_rear"), + ), + tail_front: ( + offset: (-4.5, -8.0, -4.0), + central: ("npc.pangolin.female.tail_front"), + ), + ), }) diff --git a/assets/voxygen/voxel/quadruped_low_lateral_manifest.ron b/assets/voxygen/voxel/quadruped_low_lateral_manifest.ron index 30b5fc6199..9b0f104843 100644 --- a/assets/voxygen/voxel/quadruped_low_lateral_manifest.ron +++ b/assets/voxygen/voxel/quadruped_low_lateral_manifest.ron @@ -251,4 +251,40 @@ lateral: ("npc.rocksnapper.female.foot_br"), ), ), + (Pangolin, Male): ( + front_left: ( + offset: (-1.5, 0.0, -6.0),//unique + lateral: ("npc.pangolin.male.foot_fl"), + ), + front_right: ( + offset: (-1.5, 0.0, -6.0), + lateral: ("npc.pangolin.male.foot_fr"), + ), + back_left: ( + offset: (-1.5, 0.0, -6.0), + lateral: ("npc.pangolin.male.foot_bl"), + ), + back_right: ( + offset: (-1.5, 0.0, -6.0), + lateral: ("npc.pangolin.male.foot_br"), + ), + ), + (Pangolin, Female): ( + front_left: ( + offset: (-1.5, 0.0, -6.0), + lateral: ("npc.pangolin.female.foot_fl"), + ), + front_right: ( + offset: (-1.5, 0.0, -6.0), + lateral: ("npc.pangolin.female.foot_fr"), + ), + back_left: ( + offset: (-1.5, 0.0, -6.0),//special case + lateral: ("npc.pangolin.female.foot_bl"), + ), + back_right: ( + offset: (-1.5, 0.0, -6.0), + lateral: ("npc.pangolin.female.foot_br"), + ), + ), }) diff --git a/common/src/comp/body/quadruped_low.rs b/common/src/comp/body/quadruped_low.rs index 04f5ced441..9cd2999152 100644 --- a/common/src/comp/body/quadruped_low.rs +++ b/common/src/comp/body/quadruped_low.rs @@ -34,6 +34,7 @@ pub enum Species { Asp = 4, Tortoise = 5, Rocksnapper = 6, + Pangolin = 7, } /// Data representing per-species generic data. @@ -48,6 +49,7 @@ pub struct AllSpecies { pub asp: SpeciesMeta, pub tortoise: SpeciesMeta, pub rocksnapper: SpeciesMeta, + pub pangolin: SpeciesMeta, } impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies { @@ -63,11 +65,12 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies Species::Asp => &self.asp, Species::Tortoise => &self.tortoise, Species::Rocksnapper => &self.rocksnapper, + Species::Pangolin => &self.pangolin, } } } -pub const ALL_SPECIES: [Species; 7] = [ +pub const ALL_SPECIES: [Species; 8] = [ Species::Crocodile, Species::Alligator, Species::Salamander, @@ -75,6 +78,7 @@ pub const ALL_SPECIES: [Species; 7] = [ Species::Asp, Species::Tortoise, Species::Rocksnapper, + Species::Pangolin, ]; impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies { diff --git a/voxygen/src/anim/src/quadruped_low/mod.rs b/voxygen/src/anim/src/quadruped_low/mod.rs index 1c8b034eef..1e0e3a1bd6 100644 --- a/voxygen/src/anim/src/quadruped_low/mod.rs +++ b/voxygen/src/anim/src/quadruped_low/mod.rs @@ -92,6 +92,7 @@ pub struct SkeletonAttr { tail_rear: (f32, f32), feet_f: (f32, f32, f32), feet_b: (f32, f32, f32), + lean: (f32, f32), } impl<'a> std::convert::TryFrom<&'a comp::Body> for SkeletonAttr { @@ -116,6 +117,7 @@ impl Default for SkeletonAttr { tail_rear: (0.0, 0.0), feet_f: (0.0, 0.0, 0.0), feet_b: (0.0, 0.0, 0.0), + lean: (0.0, 0.0), } } } @@ -132,6 +134,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr { (Asp, _) => (6.0, 5.5), (Tortoise, _) => (5.0, 1.0), (Rocksnapper, _) => (6.0, 0.5), + (Pangolin, _) => (-0.5, 8.0), }, head_lower: match (body.species, body.body_type) { (Crocodile, _) => (8.0, 0.0), @@ -141,6 +144,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr { (Asp, _) => (9.0, 2.5), (Tortoise, _) => (12.0, -3.5), (Rocksnapper, _) => (12.0, -9.0), + (Pangolin, _) => (8.0, -9.0), }, jaw: match (body.species, body.body_type) { (Crocodile, _) => (0.0, -3.0), @@ -150,6 +154,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr { (Asp, _) => (1.0, -2.0), (Tortoise, _) => (0.5, -2.0), (Rocksnapper, _) => (0.5, -1.5), + (Pangolin, _) => (0.5, -1.5), }, chest: match (body.species, body.body_type) { (Crocodile, _) => (0.0, 5.0), @@ -159,6 +164,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr { (Asp, _) => (0.0, 8.0), (Tortoise, _) => (0.0, 11.0), (Rocksnapper, _) => (0.0, 18.5), + (Pangolin, _) => (0.0, 7.0), }, tail_rear: match (body.species, body.body_type) { (Crocodile, _) => (-12.5, -1.0), @@ -168,6 +174,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr { (Asp, _) => (-14.0, -2.0), (Tortoise, _) => (-7.0, -1.5), (Rocksnapper, _) => (-14.5, -2.0), + (Pangolin, _) => (-7.0, -3.0), }, tail_front: match (body.species, body.body_type) { (Crocodile, _) => (-6.0, 0.0), @@ -177,6 +184,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr { (Asp, _) => (-6.0, -2.0), (Tortoise, _) => (-10.0, -3.5), (Rocksnapper, _) => (-13.5, -6.5), + (Pangolin, _) => (-7.5, -0.5), }, feet_f: match (body.species, body.body_type) { (Crocodile, _) => (3.5, 6.0, -1.0), @@ -186,6 +194,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr { (Asp, _) => (1.5, 4.0, -1.0), (Tortoise, _) => (5.5, 6.5, -3.0), (Rocksnapper, _) => (7.5, 5.0, -8.5), + (Pangolin, _) => (5.0, 5.0, -1.0), }, feet_b: match (body.species, body.body_type) { (Crocodile, _) => (3.5, -6.0, -1.0), @@ -195,6 +204,11 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr { (Asp, _) => (2.5, -5.5, -1.0), (Tortoise, _) => (7.0, -11.5, -3.0), (Rocksnapper, _) => (8.0, -16.0, -9.5), + (Pangolin, _) => (6.0, -4.0, -1.0), + }, + lean: match (body.species, body.body_type) { + (Pangolin, _) => (0.4, 0.0), + _ => (0.0, 1.0), }, } } diff --git a/voxygen/src/anim/src/quadruped_low/run.rs b/voxygen/src/anim/src/quadruped_low/run.rs index df61dbdaa6..f8c3283008 100644 --- a/voxygen/src/anim/src/quadruped_low/run.rs +++ b/voxygen/src/anim/src/quadruped_low/run.rs @@ -21,7 +21,7 @@ impl Animation for RunAnimation { ) -> Self::Skeleton { let mut next = (*skeleton).clone(); - let lab = 0.5; + let lab = 0.5 * (skeleton_attr.lean.0 + 1.0); let center = (anim_time as f32 * lab as f32 + PI / 2.0).sin(); let centeroffset = (anim_time as f32 * lab as f32 + PI * 1.5).sin(); @@ -99,7 +99,8 @@ impl Animation for RunAnimation { next.head_upper.offset = Vec3::new(0.0, skeleton_attr.head_upper.0, skeleton_attr.head_upper.1); - next.head_upper.ori = Quaternion::rotation_x(0.0) * Quaternion::rotation_z(short * -0.06); + next.head_upper.ori = + Quaternion::rotation_x(-skeleton_attr.lean.0) * Quaternion::rotation_z(short * -0.06); next.head_upper.scale = Vec3::one(); next.head_lower.offset = @@ -111,11 +112,14 @@ impl Animation for RunAnimation { next.jaw.ori = Quaternion::rotation_x(0.0); next.jaw.scale = Vec3::one() * 0.98; - next.tail_front.offset = - Vec3::new(0.0, skeleton_attr.tail_front.0, skeleton_attr.tail_front.1); + next.tail_front.offset = Vec3::new( + 0.0, + skeleton_attr.tail_front.0 + skeleton_attr.lean.0 * 2.0, + skeleton_attr.tail_front.1 + skeleton_attr.lean.0 * 2.0, + ); next.tail_front.ori = Quaternion::rotation_z(shortalt * 0.18) * Quaternion::rotation_y(shortalt * 0.1) - * Quaternion::rotation_x(0.06); + * Quaternion::rotation_x(0.06 - skeleton_attr.lean.0 * 1.2); next.tail_front.scale = Vec3::one(); next.tail_rear.offset = Vec3::new( @@ -129,8 +133,9 @@ impl Animation for RunAnimation { next.tail_rear.scale = Vec3::one(); next.chest.offset = Vec3::new(0.0, skeleton_attr.chest.0, skeleton_attr.chest.1) / 6.0; - next.chest.ori = - Quaternion::rotation_z(short * 0.12) * Quaternion::rotation_y(shortalt * 0.12); + next.chest.ori = Quaternion::rotation_z(short * 0.12) + * Quaternion::rotation_y(shortalt * 0.12) + * Quaternion::rotation_x(skeleton_attr.lean.0); next.chest.scale = Vec3::one() / 6.0; next.foot_fl.offset = Vec3::new( @@ -139,7 +144,8 @@ impl Animation for RunAnimation { skeleton_attr.feet_f.2 + 1.0 + ((footvertl * -0.8).max(-0.0)), ); next.foot_fl.ori = - Quaternion::rotation_x(footrotl * -0.25) * Quaternion::rotation_z(footrotl * 0.4); + Quaternion::rotation_x(footrotl * -0.25 * skeleton_attr.lean.1 - skeleton_attr.lean.0) + * Quaternion::rotation_z(footrotl * 0.4 * skeleton_attr.lean.1); next.foot_fl.scale = Vec3::one(); next.foot_fr.offset = Vec3::new( @@ -148,7 +154,8 @@ impl Animation for RunAnimation { skeleton_attr.feet_f.2 + 1.0 + ((footvertr * -0.8).max(-0.0)), ); next.foot_fr.ori = - Quaternion::rotation_x(footrotr * -0.25) * Quaternion::rotation_z(footrotr * -0.4); + Quaternion::rotation_x(footrotr * -0.25 * skeleton_attr.lean.1 - skeleton_attr.lean.0) + * Quaternion::rotation_z(footrotr * -0.4 * skeleton_attr.lean.1); next.foot_fr.scale = Vec3::one(); next.foot_bl.offset = Vec3::new( @@ -156,8 +163,8 @@ impl Animation for RunAnimation { skeleton_attr.feet_b.1 + foothorilb * -1.0, skeleton_attr.feet_b.2 + 1.0 + ((footvertlb * -0.6).max(-0.0)), ); - next.foot_bl.ori = - Quaternion::rotation_x(footrotlb * -0.25) * Quaternion::rotation_z(footrotlb * 0.4); + next.foot_bl.ori = Quaternion::rotation_x(footrotlb * -0.25 - skeleton_attr.lean.0) + * Quaternion::rotation_z(footrotlb * 0.4); next.foot_bl.scale = Vec3::one(); next.foot_br.offset = Vec3::new( @@ -165,8 +172,8 @@ impl Animation for RunAnimation { skeleton_attr.feet_b.1 + foothorirb * -1.0, skeleton_attr.feet_b.2 + 1.0 + ((footvertrb * -0.6).max(-0.0)), ); - next.foot_br.ori = - Quaternion::rotation_x(footrotrb * -0.25) * Quaternion::rotation_z(footrotrb * -0.4); + next.foot_br.ori = Quaternion::rotation_x(footrotrb * -0.25 - skeleton_attr.lean.0) + * Quaternion::rotation_z(footrotrb * -0.4); next.foot_br.scale = Vec3::one(); next