From fa2dd28587a168d014ed716dd05e0cf801fad0c4 Mon Sep 17 00:00:00 2001 From: Snowram Date: Sun, 20 Sep 2020 17:58:54 +0200 Subject: [PATCH] Fixed various issues from better-things branch --- common/src/comp/agent.rs | 2 ++ common/src/comp/body.rs | 9 +++++ voxygen/src/anim/src/quadruped_medium/feed.rs | 2 +- voxygen/src/anim/src/quadruped_medium/idle.rs | 2 +- voxygen/src/anim/src/quadruped_medium/mod.rs | 36 +++++++++---------- voxygen/src/anim/src/quadruped_medium/run.rs | 6 ++-- voxygen/src/anim/src/quadruped_small/mod.rs | 2 +- world/src/lib.rs | 2 ++ 8 files changed, 37 insertions(+), 24 deletions(-) diff --git a/common/src/comp/agent.rs b/common/src/comp/agent.rs index 8deb64be8a..d0cd1563f9 100644 --- a/common/src/comp/agent.rs +++ b/common/src/comp/agent.rs @@ -104,6 +104,8 @@ impl<'a> From<&'a Body> for Psyche { quadruped_medium::Species::Frostfang => 0.9, quadruped_medium::Species::Mouflon => 0.8, quadruped_medium::Species::Catoblepas => 0.8, + quadruped_medium::Species::Deer => 0.6, + quadruped_medium::Species::Hirdrasil => 0.7, _ => 1.0, }, Body::QuadrupedLow(quadruped_low) => match quadruped_low.species { diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs index 16435dc608..735470cdb9 100644 --- a/common/src/comp/body.rs +++ b/common/src/comp/body.rs @@ -238,6 +238,8 @@ impl Body { quadruped_medium::Species::Mouflon => 500, quadruped_medium::Species::Catoblepas => 1000, quadruped_medium::Species::Bonerattler => 400, + quadruped_medium::Species::Deer => 300, + quadruped_medium::Species::Hirdrasil => 500, _ => 400, }, Body::BirdMedium(bird_medium) => match bird_medium.species { @@ -305,6 +307,8 @@ impl Body { quadruped_medium::Species::Mouflon => 30, quadruped_medium::Species::Catoblepas => 50, quadruped_medium::Species::Bonerattler => 30, + quadruped_medium::Species::Deer => 30, + quadruped_medium::Species::Hirdrasil => 30, _ => 20, }, Body::BirdMedium(bird_medium) => match bird_medium.species { @@ -372,6 +376,8 @@ impl Body { quadruped_medium::Species::Mouflon => 7, quadruped_medium::Species::Catoblepas => 10, quadruped_medium::Species::Bonerattler => 10, + quadruped_medium::Species::Deer => 7, + quadruped_medium::Species::Hirdrasil => 10, _ => 6, }, Body::BirdMedium(bird_medium) => match bird_medium.species { @@ -438,6 +444,7 @@ impl Body { Body::QuadrupedSmall(quadruped_small) => match quadruped_small.species { quadruped_small::Species::Dodarock => 30, quadruped_small::Species::Hyena => 40, + quadruped_small::Species::Porcupine => 30, _ => 20, }, Body::QuadrupedMedium(quadruped_medium) => match quadruped_medium.species { @@ -447,6 +454,8 @@ impl Body { quadruped_medium::Species::Mouflon => 30, quadruped_medium::Species::Catoblepas => 20, quadruped_medium::Species::Bonerattler => 50, + quadruped_medium::Species::Deer => 30, + quadruped_medium::Species::Hirdrasil => 50, _ => 40, }, Body::BirdMedium(bird_medium) => match bird_medium.species { diff --git a/voxygen/src/anim/src/quadruped_medium/feed.rs b/voxygen/src/anim/src/quadruped_medium/feed.rs index 4788b37b62..1fe7624adf 100644 --- a/voxygen/src/anim/src/quadruped_medium/feed.rs +++ b/voxygen/src/anim/src/quadruped_medium/feed.rs @@ -79,7 +79,7 @@ impl Animation for FeedAnimation { next.jaw.position = Vec3::new( 0.0, skeleton_attr.jaw.0 - slower * 0.12, - skeleton_attr.jaw.1 + slow * 0.2 + 0.5, + skeleton_attr.jaw.1 + slow * 0.2, ); next.jaw.orientation = Quaternion::rotation_x((fast * 0.18 + faster * 0.26).min(0.0)); next.jaw.scale = Vec3::one() * 1.02; diff --git a/voxygen/src/anim/src/quadruped_medium/idle.rs b/voxygen/src/anim/src/quadruped_medium/idle.rs index 3285ba2bcb..15c56e8993 100644 --- a/voxygen/src/anim/src/quadruped_medium/idle.rs +++ b/voxygen/src/anim/src/quadruped_medium/idle.rs @@ -71,7 +71,7 @@ impl Animation for IdleAnimation { next.jaw.position = Vec3::new( 0.0, skeleton_attr.jaw.0 - slower * 0.12, - skeleton_attr.jaw.1 + slow * 0.2 + 0.5, + skeleton_attr.jaw.1 + slow * 0.2, ); next.jaw.orientation = Quaternion::rotation_x(slow * 0.05 - 0.08); next.jaw.scale = Vec3::one() * 1.02; diff --git a/voxygen/src/anim/src/quadruped_medium/mod.rs b/voxygen/src/anim/src/quadruped_medium/mod.rs index 5212b1377a..f4a9162d64 100644 --- a/voxygen/src/anim/src/quadruped_medium/mod.rs +++ b/voxygen/src/anim/src/quadruped_medium/mod.rs @@ -167,23 +167,23 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Hirdrasil, _) => (-1.0, 0.5), }, jaw: match (body.species, body.body_type) { - (Grolgar, _) => (7.0, 1.5), + (Grolgar, _) => (7.0, 2.0), (Saber, _) => (2.5, -2.0), - (Tuskram, _) => (5.5, -4.0), - (Lion, _) => (3.5, -4.5), - (Tarasque, _) => (9.0, -10.0), - (Tiger, _) => (3.5, -4.0), - (Wolf, _) => (5.0, -3.0), - (Frostfang, _) => (4.0, -3.0), - (Mouflon, _) => (6.0, 0.5), - (Catoblepas, _) => (1.0, -4.0), - (Bonerattler, _) => (3.0, -3.0), - (Deer, _) => (3.5, 2.0), - (Hirdrasil, _) => (2.5, 2.5), + (Tuskram, _) => (5.5, -3.5), + (Lion, _) => (3.5, -4.0), + (Tarasque, _) => (9.0, -9.5), + (Tiger, _) => (3.0, -3.5), + (Wolf, _) => (5.0, -2.5), + (Frostfang, _) => (4.0, -2.5), + (Mouflon, _) => (6.0, 1.0), + (Catoblepas, _) => (1.0, -3.5), + (Bonerattler, _) => (3.0, -2.5), + (Deer, _) => (3.5, 2.5), + (Hirdrasil, _) => (2.5, 3.0), }, tail: match (body.species, body.body_type) { (Grolgar, _) => (-11.5, -0.5), - (Saber, _) => (-11.0, 1.0), + (Saber, _) => (-11.0, 0.0), (Tuskram, _) => (-9.0, 2.0), (Lion, _) => (-11.0, 1.0), (Tarasque, _) => (-11.0, 0.0), @@ -191,21 +191,21 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Wolf, _) => (-11.0, 0.0), (Frostfang, _) => (-7.0, -3.5), (Mouflon, _) => (-10.5, 3.0), - (Catoblepas, _) => (-8.5, -2.0), + (Catoblepas, _) => (-8.0, -2.0), (Bonerattler, _) => (-10.0, 1.5), (Deer, _) => (-8.5, 0.5), (Hirdrasil, _) => (-11.0, 2.0), }, torso_front: match (body.species, body.body_type) { (Grolgar, _) => (10.0, 13.0), - (Saber, _) => (14.0, 14.0), + (Saber, _) => (14.0, 13.0), (Tuskram, _) => (10.0, 14.5), (Lion, _) => (10.0, 12.5), - (Tarasque, _) => (11.5, 18.5), + (Tarasque, _) => (11.5, 17.5), (Tiger, _) => (10.0, 13.0), (Wolf, _) => (12.0, 13.0), (Frostfang, _) => (9.0, 11.5), - (Mouflon, _) => (11.0, 13.5), + (Mouflon, _) => (11.0, 14.0), (Catoblepas, _) => (7.5, 19.5), (Bonerattler, _) => (6.0, 12.5), (Deer, _) => (11.0, 13.5), @@ -243,7 +243,7 @@ impl<'a> From<&'a Body> for SkeletonAttr { }, leg_f: match (body.species, body.body_type) { (Grolgar, _) => (7.5, -5.5, -1.0), - (Saber, _) => (7.0, -4.0, -3.5), + (Saber, _) => (7.0, -4.0, -2.5), (Tuskram, _) => (6.0, -6.5, -4.0), (Lion, _) => (6.5, -6.5, -1.5), (Tarasque, _) => (7.0, -8.0, -6.0), diff --git a/voxygen/src/anim/src/quadruped_medium/run.rs b/voxygen/src/anim/src/quadruped_medium/run.rs index e4e4d2ca4a..da9b089bc0 100644 --- a/voxygen/src/anim/src/quadruped_medium/run.rs +++ b/voxygen/src/anim/src/quadruped_medium/run.rs @@ -27,10 +27,10 @@ impl Animation for RunAnimation { //let increasefreqtest = (((1.0/speed)*3.0).round()).min(5.0); let lab = 0.72; //0.72 let amplitude = (speed / 24.0).max(0.25); - let amplitude2 = (speed * 1.4 / 24.0).max(0.6); - let amplitude3 = (speed / 24.0).max(0.35); + let amplitude2 = (speed * 1.4 / 24.0).powf(0.5).max(0.6); + let amplitude3 = (speed / 24.0).powf(0.5).max(0.35); let speedmult = skeleton_attr.tempo; - let canceler = speed / 24.0; + let canceler = (speed / 24.0).powf(0.5); let short = (((1.0) / (0.72 + 0.28 diff --git a/voxygen/src/anim/src/quadruped_small/mod.rs b/voxygen/src/anim/src/quadruped_small/mod.rs index ed9e73cef4..b0523a5756 100644 --- a/voxygen/src/anim/src/quadruped_small/mod.rs +++ b/voxygen/src/anim/src/quadruped_small/mod.rs @@ -250,7 +250,7 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Turtle, _) => (0.9), (Squirrel, _) => (0.7), (Fungome, _) => (0.9), - (Porcupine, _) => (1.0), + (Porcupine, _) => (0.8), (Beaver, _) => (1.0), }, tempo: match (body.species, body.body_type) { diff --git a/world/src/lib.rs b/world/src/lib.rs index 30b2d720a2..823dcdf1d6 100644 --- a/world/src/lib.rs +++ b/world/src/lib.rs @@ -244,6 +244,8 @@ impl World { quadruped_medium::Species::Catoblepas => is_hostile = false, quadruped_medium::Species::Mouflon => is_hostile = false, quadruped_medium::Species::Tuskram => is_hostile = false, + quadruped_medium::Species::Deer => is_hostile = false, + quadruped_medium::Species::Hirdrasil => is_hostile = false, _ => is_hostile = true, } },