Merge branch 'Corvella/hitboxes' into 'master'

Hitbox improvements

See merge request veloren/veloren!3395
This commit is contained in:
Marcel 2022-05-23 09:18:11 +00:00
commit d50b960592
2 changed files with 35 additions and 23 deletions

View File

@ -400,10 +400,10 @@ impl Body {
},
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::Haniwa => Vec3::new(1.3, 1.0, 2.2),
biped_small::Species::Adlet => Vec3::new(1.3, 1.0, 2.0),
biped_small::Species::Sahagin => Vec3::new(1.3, 2.0, 1.7),
biped_small::Species::Myrmidon => Vec3::new(1.3, 1.0, 2.2),
biped_small::Species::Husk => Vec3::new(1.7, 0.7, 2.7),
_ => Vec3::new(1.0, 0.75, 1.4),
@ -415,7 +415,11 @@ impl Body {
bird_medium::Species::Peacock => Vec3::new(1.3, 1.1, 1.4),
_ => Vec3::new(2.0, 1.0, 1.5),
},
Body::BirdLarge(_) => Vec3::new(2.0, 6.0, 3.5),
Body::BirdLarge(body) => match body.species {
bird_large::Species::Cockatrice => Vec3::new(2.5, 5.5, 3.5),
bird_large::Species::Roc => Vec3::new(2.2, 7.5, 4.0),
_ => Vec3::new(2.0, 6.0, 3.5),
},
Body::Dragon(_) => Vec3::new(16.0, 10.0, 16.0),
Body::FishMedium(_) => Vec3::new(0.5, 2.0, 0.8),
Body::FishSmall(_) => Vec3::new(0.3, 1.2, 0.6),
@ -427,59 +431,67 @@ impl Body {
Body::Object(object) => object.dimensions(),
Body::ItemDrop(item_drop) => item_drop.dimensions(),
Body::QuadrupedMedium(body) => match body.species {
quadruped_medium::Species::Akhlut => Vec3::new(2.5, 7.0, 3.0),
quadruped_medium::Species::Barghest => Vec3::new(2.0, 4.4, 2.7),
quadruped_medium::Species::Bear => Vec3::new(2.0, 3.8, 3.0),
quadruped_medium::Species::Catoblepas => Vec3::new(2.0, 4.0, 2.9),
quadruped_medium::Species::Cattle => Vec3::new(2.0, 3.6, 2.4),
quadruped_medium::Species::Deer => Vec3::new(2.0, 3.0, 2.2),
quadruped_medium::Species::Dreadhorn => Vec3::new(2.0, 5.0, 4.0),
quadruped_medium::Species::Dreadhorn => Vec3::new(3.5, 6.0, 4.0),
quadruped_medium::Species::Frostfang => Vec3::new(1.5, 3.0, 1.5),
quadruped_medium::Species::Grolgar => Vec3::new(2.0, 4.0, 2.0),
quadruped_medium::Species::Highland => Vec3::new(2.0, 3.6, 2.4),
quadruped_medium::Species::Horse => Vec3::new(2.0, 3.0, 2.4),
quadruped_medium::Species::Lion => Vec3::new(2.0, 3.3, 2.0),
quadruped_medium::Species::Moose => Vec3::new(2.0, 4.0, 2.5),
quadruped_medium::Species::Roshwalr => Vec3::new(2.0, 3.5, 2.2),
quadruped_medium::Species::Saber => Vec3::new(2.0, 3.0, 2.0),
quadruped_medium::Species::Tarasque => Vec3::new(2.0, 4.0, 2.6),
quadruped_medium::Species::Yak => Vec3::new(2.0, 3.6, 3.0),
quadruped_medium::Species::Mammoth => Vec3::new(2.0, 7.0, 8.0),
quadruped_medium::Species::Mammoth => Vec3::new(7.5, 11.5, 8.0),
quadruped_medium::Species::Ngoubou => Vec3::new(2.0, 3.2, 2.4),
quadruped_medium::Species::Llama => Vec3::new(2.0, 2.5, 2.6),
quadruped_medium::Species::Alpaca => Vec3::new(2.0, 2.0, 2.0),
quadruped_medium::Species::Camel => Vec3::new(2.0, 4.0, 3.5),
quadruped_medium::Species::Wolf => Vec3::new(1.7, 3.0, 1.8),
// FIXME: We really shouldn't be doing wildcards here
_ => Vec3::new(2.0, 3.0, 2.0),
},
Body::QuadrupedSmall(body) => match body.species {
quadruped_small::Species::Dodarock => Vec3::new(1.2, 1.8, 1.5),
quadruped_small::Species::Holladon => Vec3::new(1.2, 1.6, 1.5),
quadruped_small::Species::Batfox => Vec3::new(1.4, 1.7, 1.3),
quadruped_small::Species::Dodarock => Vec3::new(1.2, 1.9, 1.5),
quadruped_small::Species::Holladon => Vec3::new(1.3, 1.9, 1.5),
quadruped_small::Species::Hyena => Vec3::new(1.2, 1.4, 1.3),
quadruped_small::Species::Truffler => Vec3::new(1.2, 1.8, 2.2),
_ => Vec3::new(1.2, 1.2, 1.0),
},
Body::QuadrupedLow(body) => match body.species {
quadruped_low::Species::Asp => Vec3::new(1.0, 3.0, 1.8),
quadruped_low::Species::Asp => Vec3::new(2.0, 3.0, 1.7),
quadruped_low::Species::Crocodile => Vec3::new(1.0, 2.8, 1.3),
quadruped_low::Species::Deadwood => Vec3::new(1.0, 1.4, 1.3),
quadruped_low::Species::Lavadrake => Vec3::new(1.0, 3.0, 2.5),
quadruped_low::Species::Maneater => Vec3::new(1.0, 2.2, 4.0),
quadruped_low::Species::Monitor => Vec3::new(1.0, 2.3, 1.5),
quadruped_low::Species::Deadwood => Vec3::new(1.3, 1.3, 1.4),
quadruped_low::Species::Hakulaq => Vec3::new(1.8, 3.0, 2.0),
quadruped_low::Species::Icedrake => Vec3::new(2.0, 5.5, 2.5),
quadruped_low::Species::Lavadrake => Vec3::new(2.0, 4.7, 2.5),
quadruped_low::Species::Maneater => Vec3::new(2.5, 3.7, 4.0),
quadruped_low::Species::Monitor => Vec3::new(1.4, 3.2, 1.3),
quadruped_low::Species::Pangolin => Vec3::new(1.0, 2.6, 1.1),
quadruped_low::Species::Rocksnapper => Vec3::new(1.0, 3.0, 2.9),
quadruped_low::Species::Sandshark => Vec3::new(1.1, 4.3, 1.7),
quadruped_low::Species::Basilisk => Vec3::new(1.8, 3.4, 2.9),
quadruped_low::Species::Salamander => Vec3::new(1.0, 2.4, 1.3),
quadruped_low::Species::Tortoise => Vec3::new(1.0, 1.8, 1.6),
quadruped_low::Species::Rocksnapper => Vec3::new(2.5, 3.5, 2.9),
quadruped_low::Species::Sandshark => Vec3::new(2.1, 4.3, 1.7),
quadruped_low::Species::Basilisk => Vec3::new(2.7, 6.0, 2.9),
quadruped_low::Species::Salamander => Vec3::new(1.7, 4.0, 1.3),
quadruped_low::Species::Tortoise => Vec3::new(1.7, 2.7, 1.5),
_ => Vec3::new(1.0, 1.6, 1.3),
},
Body::Ship(ship) => ship.dimensions(),
Body::Theropod(body) => match body.species {
theropod::Species::Archaeos => Vec3::new(4.0, 8.5, 8.0),
theropod::Species::Ntouka => Vec3::new(4.0, 7.0, 8.0),
theropod::Species::Odonto => Vec3::new(4.0, 7.0, 8.0),
theropod::Species::Ntouka => Vec3::new(4.0, 9.0, 6.6),
theropod::Species::Odonto => Vec3::new(4.0, 8.0, 6.6),
theropod::Species::Sandraptor => Vec3::new(2.0, 3.0, 2.6),
theropod::Species::Snowraptor => Vec3::new(2.0, 3.0, 2.6),
theropod::Species::Sunlizard => Vec3::new(2.0, 3.6, 2.5),
theropod::Species::Woodraptor => Vec3::new(2.0, 3.0, 2.6),
theropod::Species::Yale => Vec3::new(1.5, 3.2, 4.0),
theropod::Species::Yale => Vec3::new(2.0, 3.2, 4.0),
},
Body::Arthropod(body) => match body.species {
arthropod::Species::Tarantula => Vec3::new(4.0, 4.0, 1.8),

View File

@ -413,7 +413,7 @@ impl Body {
Body::BoltFire => Vec3::new(0.1, 0.1, 0.1),
Body::Crossbow => Vec3::new(3.0, 3.0, 1.5),
Body::HaniwaSentry => Vec3::new(0.8, 0.8, 1.4),
Body::SeaLantern => Vec3::new(0.5, 0.5, 1.0),
Body::SeaLantern => Vec3::new(0.8, 0.8, 1.4),
Body::Snowball => Vec3::broadcast(2.5),
Body::Tornado => Vec3::new(2.0, 2.0, 3.4),
Body::TrainingDummy => Vec3::new(1.5, 1.5, 3.0),