From d8fff8833e2f5e09ce633d2f2cacbe4da8d6df4c Mon Sep 17 00:00:00 2001 From: jshipsey Date: Sat, 27 Jun 2020 04:37:33 -0400 Subject: [PATCH] quadlow spawn in world, continued adjustments --- .../quadruped_medium_central_manifest.ron | 4 +-- voxygen/src/anim/src/quadruped_low/mod.rs | 14 +++++----- voxygen/src/anim/src/quadruped_low/run.rs | 18 ++++++------- voxygen/src/anim/src/quadruped_medium/mod.rs | 26 +++++++++---------- voxygen/src/anim/src/quadruped_medium/run.rs | 4 +-- world/src/lib.rs | 3 ++- 6 files changed, 35 insertions(+), 34 deletions(-) diff --git a/assets/voxygen/voxel/quadruped_medium_central_manifest.ron b/assets/voxygen/voxel/quadruped_medium_central_manifest.ron index 8d6067c089..152f6a89e1 100644 --- a/assets/voxygen/voxel/quadruped_medium_central_manifest.ron +++ b/assets/voxygen/voxel/quadruped_medium_central_manifest.ron @@ -481,7 +481,7 @@ ), (Mouflon, Male): ( upper: ( - offset: (-7.5, 0.0, -4.5), + offset: (-7.0, 0.0, -4.5), central: ("npc.mouflon.male.head_upper"), ), lower: ( @@ -511,7 +511,7 @@ ), (Mouflon, Female): ( upper: ( - offset: (-7.5, 0.0, -4.5), + offset: (-7.0, 0.0, -4.5), central: ("npc.mouflon.female.head_upper"), ), lower: ( diff --git a/voxygen/src/anim/src/quadruped_low/mod.rs b/voxygen/src/anim/src/quadruped_low/mod.rs index a01e1f1775..1c8b034eef 100644 --- a/voxygen/src/anim/src/quadruped_low/mod.rs +++ b/voxygen/src/anim/src/quadruped_low/mod.rs @@ -180,21 +180,21 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr { }, feet_f: match (body.species, body.body_type) { (Crocodile, _) => (3.5, 6.0, -1.0), - (Alligator, _) => (5.5, 4.25, -1.0), + (Alligator, _) => (4.5, 4.25, -1.0), (Salamander, _) => (5.0, 5.0, -2.0), - (Monitor, _) => (4.0, 5.0, 0.0), + (Monitor, _) => (3.0, 5.0, 0.0), (Asp, _) => (1.5, 4.0, -1.0), - (Tortoise, _) => (5.5, 9.5, -3.0), + (Tortoise, _) => (5.5, 6.5, -3.0), (Rocksnapper, _) => (7.5, 5.0, -8.5), }, feet_b: match (body.species, body.body_type) { (Crocodile, _) => (3.5, -6.0, -1.0), - (Alligator, _) => (5.5, -5.5, -1.0), + (Alligator, _) => (4.5, -5.5, -1.0), (Salamander, _) => (4.0, -6.0, -2.0), - (Monitor, _) => (4.0, -6.0, 0.0), + (Monitor, _) => (3.0, -6.0, 0.0), (Asp, _) => (2.5, -5.5, -1.0), - (Tortoise, _) => (7.0, -9.5, -3.0), - (Rocksnapper, _) => (9.0, -14.0, -9.5), + (Tortoise, _) => (7.0, -11.5, -3.0), + (Rocksnapper, _) => (8.0, -16.0, -9.5), }, } } diff --git a/voxygen/src/anim/src/quadruped_low/run.rs b/voxygen/src/anim/src/quadruped_low/run.rs index 0feebc87e1..df61dbdaa6 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.7; + let lab = 0.5; 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(); @@ -136,37 +136,37 @@ impl Animation for RunAnimation { next.foot_fl.offset = Vec3::new( -skeleton_attr.feet_f.0, skeleton_attr.feet_f.1 + foothoril * -1.0, - skeleton_attr.feet_f.2 + ((footvertl * -0.8).max(-0.0)), + 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.35); + Quaternion::rotation_x(footrotl * -0.25) * Quaternion::rotation_z(footrotl * 0.4); next.foot_fl.scale = Vec3::one(); next.foot_fr.offset = Vec3::new( skeleton_attr.feet_f.0, skeleton_attr.feet_f.1 + foothorir * -1.0, - skeleton_attr.feet_f.2 + ((footvertr * -0.8).max(-0.0)), + 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.35); + Quaternion::rotation_x(footrotr * -0.25) * Quaternion::rotation_z(footrotr * -0.4); next.foot_fr.scale = Vec3::one(); next.foot_bl.offset = Vec3::new( -skeleton_attr.feet_b.0, skeleton_attr.feet_b.1 + foothorilb * -1.0, - skeleton_attr.feet_b.2 + ((footvertlb * -0.6).max(-0.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.35); + Quaternion::rotation_x(footrotlb * -0.25) * Quaternion::rotation_z(footrotlb * 0.4); next.foot_bl.scale = Vec3::one(); next.foot_br.offset = Vec3::new( skeleton_attr.feet_b.0, skeleton_attr.feet_b.1 + foothorirb * -1.0, - skeleton_attr.feet_b.2 + ((footvertrb * -0.6).max(-0.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.35); + Quaternion::rotation_x(footrotrb * -0.25) * Quaternion::rotation_z(footrotrb * -0.4); next.foot_br.scale = Vec3::one(); next diff --git a/voxygen/src/anim/src/quadruped_medium/mod.rs b/voxygen/src/anim/src/quadruped_medium/mod.rs index dd0215d048..2bcfc6ae17 100644 --- a/voxygen/src/anim/src/quadruped_medium/mod.rs +++ b/voxygen/src/anim/src/quadruped_medium/mod.rs @@ -179,7 +179,7 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr { (Tuskram, _) => (1.0, 1.0), (Lion, _) => (0.5, 1.0), (Tarasque, _) => (0.5, -4.0), - (Tiger, _) => (-5.0, -6.0), + (Tiger, _) => (0.0, 0.0), (Wolf, _) => (-4.5, 2.0), (Frostfang, _) => (2.0, 1.5), (Mouflon, _) => (-1.0, 0.5), @@ -212,20 +212,20 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr { (Tuskram, _) => (10.0, 15.5), (Lion, _) => (10.0, 13.0), (Tarasque, _) => (11.5, 18.5), - (Tiger, _) => (10.0, 12.0), - (Wolf, _) => (12.0, 13.0), + (Tiger, _) => (10.0, 14.0), + (Wolf, _) => (12.0, 14.0), (Frostfang, _) => (9.0, 11.5), (Mouflon, _) => (11.0, 13.5), }, torso_back: match (body.species, body.body_type) { (Grolgar, _) => (-14.0, 1.5), (Saber, _) => (-13.5, 0.0), - (Tuskram, _) => (-12.0, -2.0), - (Lion, _) => (-13.0, -1.0), + (Tuskram, _) => (-13.0, -2.0), + (Lion, _) => (-13.0, -0.5), (Tarasque, _) => (-14.0, -1.0), (Tiger, _) => (-13.0, 0.0), (Wolf, _) => (-12.5, 1.0), - (Frostfang, _) => (-9.0, 0.0), + (Frostfang, _) => (-10.5, 0.0), (Mouflon, _) => (-8.5, -0.5), }, ears: match (body.species, body.body_type) { @@ -243,9 +243,9 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr { (Grolgar, _) => (-7.0, -5.0, -2.0), (Saber, _) => (7.0, -7.5, -3.5), (Tuskram, _) => (6.0, -6.5, -5.5), - (Lion, _) => (7.5, -4.5, -6.0), + (Lion, _) => (6.5, -9.0, -6.0), (Tarasque, _) => (7.0, -8.0, -6.0), - (Tiger, _) => (7.0, -2.0, -1.0), + (Tiger, _) => (7.0, -5.0, -3.0), (Wolf, _) => (4.5, -6.5, -1.0), (Frostfang, _) => (5.5, -5.5, -2.0), (Mouflon, _) => (5.0, -5.5, -5.0), @@ -254,11 +254,11 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr { (Grolgar, _) => (6.0, -6.5, -3.5), (Saber, _) => (6.0, -7.0, -4.0), (Tuskram, _) => (5.0, -5.5, -3.5), - (Lion, _) => (6.0, -6.0, -2.0), + (Lion, _) => (6.0, -6.0, -2.5), (Tarasque, _) => (6.0, -6.5, -6.5), - (Tiger, _) => (7.0, -8.0, -1.0), + (Tiger, _) => (7.0, -8.0, -3.0), (Wolf, _) => (5.0, -6.5, -2.5), - (Frostfang, _) => (3.5, -6.5, -2.0), + (Frostfang, _) => (3.5, -4.5, -2.0), (Mouflon, _) => (3.5, -5.0, -4.5), }, feet_f: match (body.species, body.body_type) { @@ -268,7 +268,7 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr { (Lion, _) => (0.0, 0.0, -1.5), (Tarasque, _) => (1.0, 0.0, -3.0), (Tiger, _) => (0.5, 0.0, -5.0), - (Wolf, _) => (0.5, 1.5, -3.5), + (Wolf, _) => (0.5, -1.0, -3.5), (Frostfang, _) => (0.5, 1.5, -3.5), (Mouflon, _) => (-0.5, -0.5, -1.5), }, @@ -279,7 +279,7 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr { (Lion, _) => (0.5, 0.5, -4.0), (Tarasque, _) => (1.5, -1.0, -2.5), (Tiger, _) => (1.0, 0.5, -4.0), - (Wolf, _) => (0.0, -1.5, -3.0), + (Wolf, _) => (0.0, -2.0, -3.0), (Frostfang, _) => (0.0, -1.5, -3.5), (Mouflon, _) => (-1.0, -1.5, -2.5), }, diff --git a/voxygen/src/anim/src/quadruped_medium/run.rs b/voxygen/src/anim/src/quadruped_medium/run.rs index e7a062a32e..efd1e62f8a 100644 --- a/voxygen/src/anim/src/quadruped_medium/run.rs +++ b/voxygen/src/anim/src/quadruped_medium/run.rs @@ -116,7 +116,7 @@ impl Animation for RunAnimation { next.head_lower.offset = Vec3::new( 0.0, - skeleton_attr.head_lower.0 + horichest * 0.8, + skeleton_attr.head_lower.0 + horichest * 0.4, skeleton_attr.head_lower.1 + vertchest * -0.8, ); next.head_lower.ori = Quaternion::rotation_z(0.0); @@ -220,7 +220,7 @@ impl Animation for RunAnimation { next.head_lower.offset = Vec3::new( 0.0, - skeleton_attr.head_lower.0 + horichest * 0.8, + skeleton_attr.head_lower.0 + horichest * 0.4, skeleton_attr.head_lower.1 + vertchest * -0.8, ); next.head_lower.ori = Quaternion::rotation_z(0.0); diff --git a/world/src/lib.rs b/world/src/lib.rs index dc94f436b8..f8740db902 100644 --- a/world/src/lib.rs +++ b/world/src/lib.rs @@ -22,7 +22,7 @@ use crate::{ util::{Grid, Sampler}, }; use common::{ - comp::{self, bird_medium, critter, quadruped_medium, quadruped_small}, + comp::{self, bird_medium, critter, quadruped_low, quadruped_medium, quadruped_small}, generation::{ChunkSupplement, EntityInfo}, terrain::{Block, BlockKind, TerrainChunk, TerrainChunkMeta, TerrainChunkSize}, vol::{ReadVol, RectVolSize, Vox, WriteVol}, @@ -201,6 +201,7 @@ impl World { 0 => comp::Body::QuadrupedMedium(quadruped_medium::Body::random()), 1 => comp::Body::BirdMedium(bird_medium::Body::random()), 2 => comp::Body::Critter(critter::Body::random()), + 3 => comp::Body::QuadrupedLow(quadruped_low::Body::random()), _ => comp::Body::QuadrupedSmall(quadruped_small::Body::random()), }) .with_automatic_name();