From 2b9d5ee4a2c0abe82d3f7554222a8c7e88577dbb Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Mon, 24 Aug 2020 20:52:18 +0100 Subject: [PATCH] Fixed bad hitbox radii and adjusted field colour --- assets/world/style/colors.ron | 4 ++-- common/src/comp/body.rs | 24 ++++++++++++------------ common/src/sys/phys.rs | 7 ++++--- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/assets/world/style/colors.ron b/assets/world/style/colors.ron index 330bdbfc0b..cf3aa46b2b 100644 --- a/assets/world/style/colors.ron +++ b/assets/world/style/colors.ron @@ -89,7 +89,7 @@ Roof1: (0x99, 0x5E, 0x54), Roof2: (0x43, 0x63, 0x64), Roof3: (0x76, 0x6D, 0x68), - Roof4: (0x65, 0x01, 0x41), + Roof4: (0x55, 0x25, 0x41), Roof5: (0x52, 0x20, 0x20), Roof6: (0x05, 0x3A, 0x40), Roof7: (0xCC, 0x56, 0x3E), @@ -134,7 +134,7 @@ ), plot_town_path: (90, 70, 45), - plot_field_dirt: (70, 25, 15), + plot_field_dirt: (35, 10, 5), plot_field_mound: (40, 60, 10), wall_low: (130, 100, 0), diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs index 7c35e58bfb..6ba41afea7 100644 --- a/common/src/comp/body.rs +++ b/common/src/comp/body.rs @@ -139,18 +139,18 @@ impl Body { pub fn radius(&self) -> f32 { // TODO: Improve these values (some might be reliant on more info in inner type) match self { - Body::Humanoid(_) => 0.6, - Body::QuadrupedSmall(_) => 0.6, - Body::QuadrupedMedium(_) => 0.9, - Body::QuadrupedLow(_) => 1.0, - Body::Critter(_) => 0.5, - Body::BirdMedium(_) => 0.5, - Body::FishMedium(_) => 0.5, - Body::Dragon(_) => 2.5, - Body::BirdSmall(_) => 0.4, - Body::FishSmall(_) => 0.4, - Body::BipedLarge(_) => 2.0, - Body::Golem(_) => 1.75, + Body::Humanoid(_) => 0.35, + Body::QuadrupedSmall(_) => 0.4, + Body::QuadrupedMedium(_) => 0.45, + Body::QuadrupedLow(_) => 0.45, + Body::Critter(_) => 0.3, + Body::BirdMedium(_) => 0.35, + Body::FishMedium(_) => 0.35, + Body::Dragon(_) => 8.0, + Body::BirdSmall(_) => 0.3, + Body::FishSmall(_) => 0.3, + Body::BipedLarge(_) => 0.5, + Body::Golem(_) => 0.4, Body::Object(_) => 0.4, } } diff --git a/common/src/sys/phys.rs b/common/src/sys/phys.rs index cca5325346..532a88d48a 100644 --- a/common/src/sys/phys.rs +++ b/common/src/sys/phys.rs @@ -329,10 +329,11 @@ impl<'a> System<'a> for Sys { z_max, } => { // Scale collider - // TODO: Use scale when pathfinding is good enough to manage irregular entity sizes - let radius = radius; // * scale; + // TODO: Use scale & actual proportions when pathfinding is good enough to manage irregular entity + // sizes + let radius = radius.min(0.45); // * scale; let z_min = z_min; // * scale; - let z_max = z_max.max(1.0); // * scale; + let z_max = z_max.clamped(1.0, 1.95); // * scale; // Probe distances let hdist = radius.ceil() as i32;