quadlow spawn in world, continued adjustments

This commit is contained in:
jshipsey 2020-06-27 04:37:33 -04:00
parent c5f7a60f3b
commit d8fff8833e
6 changed files with 35 additions and 34 deletions

View File

@ -481,7 +481,7 @@
), ),
(Mouflon, Male): ( (Mouflon, Male): (
upper: ( upper: (
offset: (-7.5, 0.0, -4.5), offset: (-7.0, 0.0, -4.5),
central: ("npc.mouflon.male.head_upper"), central: ("npc.mouflon.male.head_upper"),
), ),
lower: ( lower: (
@ -511,7 +511,7 @@
), ),
(Mouflon, Female): ( (Mouflon, Female): (
upper: ( upper: (
offset: (-7.5, 0.0, -4.5), offset: (-7.0, 0.0, -4.5),
central: ("npc.mouflon.female.head_upper"), central: ("npc.mouflon.female.head_upper"),
), ),
lower: ( lower: (

View File

@ -180,21 +180,21 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr {
}, },
feet_f: match (body.species, body.body_type) { feet_f: match (body.species, body.body_type) {
(Crocodile, _) => (3.5, 6.0, -1.0), (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), (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), (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), (Rocksnapper, _) => (7.5, 5.0, -8.5),
}, },
feet_b: match (body.species, body.body_type) { feet_b: match (body.species, body.body_type) {
(Crocodile, _) => (3.5, -6.0, -1.0), (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), (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), (Asp, _) => (2.5, -5.5, -1.0),
(Tortoise, _) => (7.0, -9.5, -3.0), (Tortoise, _) => (7.0, -11.5, -3.0),
(Rocksnapper, _) => (9.0, -14.0, -9.5), (Rocksnapper, _) => (8.0, -16.0, -9.5),
}, },
} }
} }

View File

@ -21,7 +21,7 @@ impl Animation for RunAnimation {
) -> Self::Skeleton { ) -> Self::Skeleton {
let mut next = (*skeleton).clone(); 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 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(); 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( next.foot_fl.offset = Vec3::new(
-skeleton_attr.feet_f.0, -skeleton_attr.feet_f.0,
skeleton_attr.feet_f.1 + foothoril * -1.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 = 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_fl.scale = Vec3::one();
next.foot_fr.offset = Vec3::new( next.foot_fr.offset = Vec3::new(
skeleton_attr.feet_f.0, skeleton_attr.feet_f.0,
skeleton_attr.feet_f.1 + foothorir * -1.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 = 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_fr.scale = Vec3::one();
next.foot_bl.offset = Vec3::new( next.foot_bl.offset = Vec3::new(
-skeleton_attr.feet_b.0, -skeleton_attr.feet_b.0,
skeleton_attr.feet_b.1 + foothorilb * -1.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 = 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_bl.scale = Vec3::one();
next.foot_br.offset = Vec3::new( next.foot_br.offset = Vec3::new(
skeleton_attr.feet_b.0, skeleton_attr.feet_b.0,
skeleton_attr.feet_b.1 + foothorirb * -1.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 = 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.foot_br.scale = Vec3::one();
next next

View File

@ -179,7 +179,7 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
(Tuskram, _) => (1.0, 1.0), (Tuskram, _) => (1.0, 1.0),
(Lion, _) => (0.5, 1.0), (Lion, _) => (0.5, 1.0),
(Tarasque, _) => (0.5, -4.0), (Tarasque, _) => (0.5, -4.0),
(Tiger, _) => (-5.0, -6.0), (Tiger, _) => (0.0, 0.0),
(Wolf, _) => (-4.5, 2.0), (Wolf, _) => (-4.5, 2.0),
(Frostfang, _) => (2.0, 1.5), (Frostfang, _) => (2.0, 1.5),
(Mouflon, _) => (-1.0, 0.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), (Tuskram, _) => (10.0, 15.5),
(Lion, _) => (10.0, 13.0), (Lion, _) => (10.0, 13.0),
(Tarasque, _) => (11.5, 18.5), (Tarasque, _) => (11.5, 18.5),
(Tiger, _) => (10.0, 12.0), (Tiger, _) => (10.0, 14.0),
(Wolf, _) => (12.0, 13.0), (Wolf, _) => (12.0, 14.0),
(Frostfang, _) => (9.0, 11.5), (Frostfang, _) => (9.0, 11.5),
(Mouflon, _) => (11.0, 13.5), (Mouflon, _) => (11.0, 13.5),
}, },
torso_back: match (body.species, body.body_type) { torso_back: match (body.species, body.body_type) {
(Grolgar, _) => (-14.0, 1.5), (Grolgar, _) => (-14.0, 1.5),
(Saber, _) => (-13.5, 0.0), (Saber, _) => (-13.5, 0.0),
(Tuskram, _) => (-12.0, -2.0), (Tuskram, _) => (-13.0, -2.0),
(Lion, _) => (-13.0, -1.0), (Lion, _) => (-13.0, -0.5),
(Tarasque, _) => (-14.0, -1.0), (Tarasque, _) => (-14.0, -1.0),
(Tiger, _) => (-13.0, 0.0), (Tiger, _) => (-13.0, 0.0),
(Wolf, _) => (-12.5, 1.0), (Wolf, _) => (-12.5, 1.0),
(Frostfang, _) => (-9.0, 0.0), (Frostfang, _) => (-10.5, 0.0),
(Mouflon, _) => (-8.5, -0.5), (Mouflon, _) => (-8.5, -0.5),
}, },
ears: match (body.species, body.body_type) { 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), (Grolgar, _) => (-7.0, -5.0, -2.0),
(Saber, _) => (7.0, -7.5, -3.5), (Saber, _) => (7.0, -7.5, -3.5),
(Tuskram, _) => (6.0, -6.5, -5.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), (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), (Wolf, _) => (4.5, -6.5, -1.0),
(Frostfang, _) => (5.5, -5.5, -2.0), (Frostfang, _) => (5.5, -5.5, -2.0),
(Mouflon, _) => (5.0, -5.5, -5.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), (Grolgar, _) => (6.0, -6.5, -3.5),
(Saber, _) => (6.0, -7.0, -4.0), (Saber, _) => (6.0, -7.0, -4.0),
(Tuskram, _) => (5.0, -5.5, -3.5), (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), (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), (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), (Mouflon, _) => (3.5, -5.0, -4.5),
}, },
feet_f: match (body.species, body.body_type) { 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), (Lion, _) => (0.0, 0.0, -1.5),
(Tarasque, _) => (1.0, 0.0, -3.0), (Tarasque, _) => (1.0, 0.0, -3.0),
(Tiger, _) => (0.5, 0.0, -5.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), (Frostfang, _) => (0.5, 1.5, -3.5),
(Mouflon, _) => (-0.5, -0.5, -1.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), (Lion, _) => (0.5, 0.5, -4.0),
(Tarasque, _) => (1.5, -1.0, -2.5), (Tarasque, _) => (1.5, -1.0, -2.5),
(Tiger, _) => (1.0, 0.5, -4.0), (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), (Frostfang, _) => (0.0, -1.5, -3.5),
(Mouflon, _) => (-1.0, -1.5, -2.5), (Mouflon, _) => (-1.0, -1.5, -2.5),
}, },

View File

@ -116,7 +116,7 @@ impl Animation for RunAnimation {
next.head_lower.offset = Vec3::new( next.head_lower.offset = Vec3::new(
0.0, 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, skeleton_attr.head_lower.1 + vertchest * -0.8,
); );
next.head_lower.ori = Quaternion::rotation_z(0.0); next.head_lower.ori = Quaternion::rotation_z(0.0);
@ -220,7 +220,7 @@ impl Animation for RunAnimation {
next.head_lower.offset = Vec3::new( next.head_lower.offset = Vec3::new(
0.0, 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, skeleton_attr.head_lower.1 + vertchest * -0.8,
); );
next.head_lower.ori = Quaternion::rotation_z(0.0); next.head_lower.ori = Quaternion::rotation_z(0.0);

View File

@ -22,7 +22,7 @@ use crate::{
util::{Grid, Sampler}, util::{Grid, Sampler},
}; };
use common::{ 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}, generation::{ChunkSupplement, EntityInfo},
terrain::{Block, BlockKind, TerrainChunk, TerrainChunkMeta, TerrainChunkSize}, terrain::{Block, BlockKind, TerrainChunk, TerrainChunkMeta, TerrainChunkSize},
vol::{ReadVol, RectVolSize, Vox, WriteVol}, vol::{ReadVol, RectVolSize, Vox, WriteVol},
@ -201,6 +201,7 @@ impl World {
0 => comp::Body::QuadrupedMedium(quadruped_medium::Body::random()), 0 => comp::Body::QuadrupedMedium(quadruped_medium::Body::random()),
1 => comp::Body::BirdMedium(bird_medium::Body::random()), 1 => comp::Body::BirdMedium(bird_medium::Body::random()),
2 => comp::Body::Critter(critter::Body::random()), 2 => comp::Body::Critter(critter::Body::random()),
3 => comp::Body::QuadrupedLow(quadruped_low::Body::random()),
_ => comp::Body::QuadrupedSmall(quadruped_small::Body::random()), _ => comp::Body::QuadrupedSmall(quadruped_small::Body::random()),
}) })
.with_automatic_name(); .with_automatic_name();