From f336b0e2a864c2f6b526b6065300c1ad245fe2ca Mon Sep 17 00:00:00 2001 From: Scott Williams Date: Wed, 9 Jun 2021 15:23:10 +0100 Subject: [PATCH] Fixed biped_small and humanoid hitboxes --- common/src/comp/body.rs | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs index 357a06444e..2cc9582c5a 100644 --- a/common/src/comp/body.rs +++ b/common/src/comp/body.rs @@ -308,7 +308,16 @@ impl Body { _ => Vec3::new(4.6, 3.0, 6.0), }, - Body::BipedSmall(_) => Vec3::new(1.0, 0.75, 1.4), + Body::BipedSmall(body) => match body.species { + biped_small::Species::Gnarling => Vec3::new(1.0, 0.75, 1.4), + biped_small::Species::Haniwa => Vec3::new(1.0, 0.75, 2.2), + biped_small::Species::Adlet => Vec3::new(1.0, 0.75, 2.0), + biped_small::Species::Sahagin => Vec3::new(1.0, 1.2, 1.7), + biped_small::Species::Myrmidon => Vec3::new(1.0, 0.75, 2.2), + biped_small::Species::Husk => Vec3::new(1.0, 0.75, 1.7), + + _ => Vec3::new(1.0, 0.75, 1.4), + }, Body::BirdMedium(_) => Vec3::new(2.0, 1.0, 1.5), Body::BirdLarge(_) => Vec3::new(2.0, 6.0, 3.5), Body::Dragon(_) => Vec3::new(16.0, 10.0, 16.0), @@ -317,16 +326,16 @@ impl Body { Body::Golem(_) => Vec3::new(5.0, 5.0, 7.5), Body::Humanoid(humanoid) => { let height = match (humanoid.species, humanoid.body_type) { - (humanoid::Species::Orc, humanoid::BodyType::Male) => 2.3, - (humanoid::Species::Orc, humanoid::BodyType::Female) => 2.2, - (humanoid::Species::Human, humanoid::BodyType::Male) => 2.3, - (humanoid::Species::Human, humanoid::BodyType::Female) => 2.2, - (humanoid::Species::Elf, humanoid::BodyType::Male) => 2.3, - (humanoid::Species::Elf, humanoid::BodyType::Female) => 2.2, - (humanoid::Species::Dwarf, humanoid::BodyType::Male) => 1.9, - (humanoid::Species::Dwarf, humanoid::BodyType::Female) => 1.8, - (humanoid::Species::Undead, humanoid::BodyType::Male) => 2.2, - (humanoid::Species::Undead, humanoid::BodyType::Female) => 2.1, + (humanoid::Species::Orc, humanoid::BodyType::Male) => 2.0, + (humanoid::Species::Orc, humanoid::BodyType::Female) => 1.9, + (humanoid::Species::Human, humanoid::BodyType::Male) => 1.8, + (humanoid::Species::Human, humanoid::BodyType::Female) => 1.7, + (humanoid::Species::Elf, humanoid::BodyType::Male) => 1.9, + (humanoid::Species::Elf, humanoid::BodyType::Female) => 1.8, + (humanoid::Species::Dwarf, humanoid::BodyType::Male) => 1.6, + (humanoid::Species::Dwarf, humanoid::BodyType::Female) => 1.5, + (humanoid::Species::Undead, humanoid::BodyType::Male) => 1.9, + (humanoid::Species::Undead, humanoid::BodyType::Female) => 1.8, (humanoid::Species::Danari, humanoid::BodyType::Male) => 1.5, (humanoid::Species::Danari, humanoid::BodyType::Female) => 1.4, };