mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
spawn tweaks, improved odonto
This commit is contained in:
parent
fecc40ad8e
commit
5bb45a4861
@ -602,9 +602,9 @@
|
|||||||
"keyword": "archaeos",
|
"keyword": "archaeos",
|
||||||
"generic": "Archaeos"
|
"generic": "Archaeos"
|
||||||
},
|
},
|
||||||
"odontotyrannos": {
|
"odonto": {
|
||||||
"keyword": "odontotyrannos",
|
"keyword": "odonto",
|
||||||
"generic": "Odontotyrannos"
|
"generic": "Odonto"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -59,14 +59,14 @@
|
|||||||
central: ("npc.archaeos.male.tail_back"),
|
central: ("npc.archaeos.male.tail_back"),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
(Odontotyrannos, Male): (
|
(Odonto, Male): (
|
||||||
head: (
|
head: (
|
||||||
offset: (-10.5, 0.0, -8.0),
|
offset: (-10.5, 0.0, -8.0),
|
||||||
central: ("npc.odontotyrannos.male.head"),
|
central: ("npc.odonto.male.head"),
|
||||||
),
|
),
|
||||||
jaw: (
|
jaw: (
|
||||||
offset: (-6.5, 0.0, -3.0),
|
offset: (-6.5, 0.0, -3.0),
|
||||||
central: ("npc.odontotyrannos.male.jaw"),
|
central: ("npc.odonto.male.jaw"),
|
||||||
),
|
),
|
||||||
neck: (
|
neck: (
|
||||||
offset: (0.0, 0.0, 0.0),
|
offset: (0.0, 0.0, 0.0),
|
||||||
@ -74,29 +74,29 @@
|
|||||||
),
|
),
|
||||||
chest_front: (
|
chest_front: (
|
||||||
offset: (-5.5, -5.0, -6.0),
|
offset: (-5.5, -5.0, -6.0),
|
||||||
central: ("npc.odontotyrannos.male.chest_front"),
|
central: ("npc.odonto.male.chest_front"),
|
||||||
),
|
),
|
||||||
chest_back: (
|
chest_back: (
|
||||||
offset: (-6.5, -8.0, -8.5),
|
offset: (-6.5, -8.0, -8.5),
|
||||||
central: ("npc.odontotyrannos.male.chest_back"),
|
central: ("npc.odonto.male.chest_back"),
|
||||||
),
|
),
|
||||||
tail_front: (
|
tail_front: (
|
||||||
offset: (-3.5, -8.0, -5.5),
|
offset: (-3.5, -8.0, -5.5),
|
||||||
central: ("npc.odontotyrannos.male.tail_front"),
|
central: ("npc.odonto.male.tail_front"),
|
||||||
),
|
),
|
||||||
tail_back: (
|
tail_back: (
|
||||||
offset: (-2.5, -23.0, -3.0),
|
offset: (-2.5, -19.0, -5.0),
|
||||||
central: ("npc.odontotyrannos.male.tail_back"),
|
central: ("npc.odonto.male.tail_back"),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
(Odontotyrannos, Female): (
|
(Odonto, Female): (
|
||||||
head: (
|
head: (
|
||||||
offset: (-10.5, 0.0, -8.0),
|
offset: (-10.5, 0.0, -8.0),
|
||||||
central: ("npc.odontotyrannos.male.head"),
|
central: ("npc.odonto.male.head"),
|
||||||
),
|
),
|
||||||
jaw: (
|
jaw: (
|
||||||
offset: (-6.5, 0.0, -3.0),
|
offset: (-6.5, 0.0, -3.0),
|
||||||
central: ("npc.odontotyrannos.male.jaw"),
|
central: ("npc.odonto.male.jaw"),
|
||||||
),
|
),
|
||||||
neck: (
|
neck: (
|
||||||
offset: (0.0, 0.0, 0.0),
|
offset: (0.0, 0.0, 0.0),
|
||||||
@ -104,19 +104,19 @@
|
|||||||
),
|
),
|
||||||
chest_front: (
|
chest_front: (
|
||||||
offset: (-5.5, -5.0, -6.0),
|
offset: (-5.5, -5.0, -6.0),
|
||||||
central: ("npc.odontotyrannos.male.chest_front"),
|
central: ("npc.odonto.male.chest_front"),
|
||||||
),
|
),
|
||||||
chest_back: (
|
chest_back: (
|
||||||
offset: (-6.5, -8.0, -8.5),
|
offset: (-6.5, -8.0, -8.5),
|
||||||
central: ("npc.odontotyrannos.male.chest_back"),
|
central: ("npc.odonto.male.chest_back"),
|
||||||
),
|
),
|
||||||
tail_front: (
|
tail_front: (
|
||||||
offset: (-3.5, -8.0, -5.5),
|
offset: (-3.5, -8.0, -5.5),
|
||||||
central: ("npc.odontotyrannos.male.tail_front"),
|
central: ("npc.odonto.male.tail_front"),
|
||||||
),
|
),
|
||||||
tail_back: (
|
tail_back: (
|
||||||
offset: (-2.5, -8.0, -3.0),
|
offset: (-2.5, -19.0, -5.0),
|
||||||
central: ("npc.odontotyrannos.male.tail_back"),
|
central: ("npc.odonto.male.tail_back"),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
})
|
})
|
||||||
|
@ -51,56 +51,56 @@
|
|||||||
lateral: ("npc.archaeos.male.foot_r"),
|
lateral: ("npc.archaeos.male.foot_r"),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
(Odontotyrannos, Male): (
|
(Odonto, Male): (
|
||||||
hand_l: (
|
hand_l: (
|
||||||
offset: (-3.0, -3.0, -7.0),
|
offset: (-3.0, -3.0, -7.0),
|
||||||
lateral: ("npc.odontotyrannos.male.hand_l"),
|
lateral: ("npc.odonto.male.hand_l"),
|
||||||
),
|
),
|
||||||
hand_r: (
|
hand_r: (
|
||||||
offset: (0.0, -3.0, -7.0),
|
offset: (0.0, -3.0, -7.0),
|
||||||
lateral: ("npc.odontotyrannos.male.hand_r"),
|
lateral: ("npc.odonto.male.hand_r"),
|
||||||
),
|
),
|
||||||
leg_l: (
|
leg_l: (
|
||||||
offset: (-7.0, -4.5, -4.0),
|
offset: (-7.0, -4.5, -4.0),
|
||||||
lateral: ("npc.odontotyrannos.male.leg_l"),
|
lateral: ("npc.odonto.male.leg_l"),
|
||||||
),
|
),
|
||||||
leg_r: (
|
leg_r: (
|
||||||
offset: (0.0, -4.5, -4.0),
|
offset: (0.0, -4.5, -4.0),
|
||||||
lateral: ("npc.odontotyrannos.male.leg_r"),
|
lateral: ("npc.odonto.male.leg_r"),
|
||||||
),
|
),
|
||||||
foot_l: (
|
foot_l: (
|
||||||
offset: (-14.0, -1.0, -8.0),
|
offset: (-8.0, -1.0, -8.0),
|
||||||
lateral: ("npc.odontotyrannos.male.foot_l"),
|
lateral: ("npc.odonto.male.foot_l"),
|
||||||
),
|
),
|
||||||
foot_r: (
|
foot_r: (
|
||||||
offset: (-6.0, -1.0, -8.0),
|
offset: (-6.0, -1.0, -8.0),
|
||||||
lateral: ("npc.odontotyrannos.male.foot_r"),
|
lateral: ("npc.odonto.male.foot_r"),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
(Odontotyrannos, Female): (
|
(Odonto, Female): (
|
||||||
hand_l: (
|
hand_l: (
|
||||||
offset: (-3.0, -3.0, -7.0),
|
offset: (-3.0, -3.0, -7.0),
|
||||||
lateral: ("npc.odontotyrannos.male.hand_l"),
|
lateral: ("npc.odonto.male.hand_l"),
|
||||||
),
|
),
|
||||||
hand_r: (
|
hand_r: (
|
||||||
offset: (0.0, -3.0, -7.0),
|
offset: (0.0, -3.0, -7.0),
|
||||||
lateral: ("npc.odontotyrannos.male.hand_r"),
|
lateral: ("npc.odonto.male.hand_r"),
|
||||||
),
|
),
|
||||||
leg_l: (
|
leg_l: (
|
||||||
offset: (-7.0, -4.5, -4.0),
|
offset: (-7.0, -4.5, -4.0),
|
||||||
lateral: ("npc.odontotyrannos.male.leg_l"),
|
lateral: ("npc.odonto.male.leg_l"),
|
||||||
),
|
),
|
||||||
leg_r: (
|
leg_r: (
|
||||||
offset: (0.0, -4.5, -4.0),
|
offset: (0.0, -4.5, -4.0),
|
||||||
lateral: ("npc.odontotyrannos.male.leg_r"),
|
lateral: ("npc.odonto.male.leg_r"),
|
||||||
),
|
),
|
||||||
foot_l: (
|
foot_l: (
|
||||||
offset: (-14.0, -1.0, -8.0),
|
offset: (-8.0, -1.0, -8.0),
|
||||||
lateral: ("npc.odontotyrannos.male.foot_l"),
|
lateral: ("npc.odonto.male.foot_l"),
|
||||||
),
|
),
|
||||||
foot_r: (
|
foot_r: (
|
||||||
offset: (-6.0, -1.0, -8.0),
|
offset: (-6.0, -1.0, -8.0),
|
||||||
lateral: ("npc.odontotyrannos.male.foot_r"),
|
lateral: ("npc.odonto.male.foot_r"),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
})
|
})
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
comp::{humanoid, quadruped_low, quadruped_medium, quadruped_small, theropod, Body},
|
comp::{humanoid, quadruped_low, quadruped_medium, quadruped_small, Body},
|
||||||
path::Chaser,
|
path::Chaser,
|
||||||
sync::Uid,
|
sync::Uid,
|
||||||
};
|
};
|
||||||
|
@ -29,14 +29,14 @@ impl From<Body> for super::Body {
|
|||||||
#[repr(u32)]
|
#[repr(u32)]
|
||||||
pub enum Species {
|
pub enum Species {
|
||||||
Archaeos = 0,
|
Archaeos = 0,
|
||||||
Odontotyrannos = 1,
|
Odonto = 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Data representing per-species generic data.
|
/// Data representing per-species generic data.
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
pub struct AllSpecies<SpeciesMeta> {
|
pub struct AllSpecies<SpeciesMeta> {
|
||||||
pub archaeos: SpeciesMeta,
|
pub archaeos: SpeciesMeta,
|
||||||
pub odontotyrannos: SpeciesMeta,
|
pub odonto: SpeciesMeta,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta> {
|
impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta> {
|
||||||
@ -46,12 +46,12 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta>
|
|||||||
fn index(&self, &index: &'a Species) -> &Self::Output {
|
fn index(&self, &index: &'a Species) -> &Self::Output {
|
||||||
match index {
|
match index {
|
||||||
Species::Archaeos => &self.archaeos,
|
Species::Archaeos => &self.archaeos,
|
||||||
Species::Odontotyrannos => &self.odontotyrannos,
|
Species::Odonto => &self.odonto,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const ALL_SPECIES: [Species; 2] = [Species::Archaeos, Species::Odontotyrannos];
|
pub const ALL_SPECIES: [Species; 2] = [Species::Archaeos, Species::Odonto];
|
||||||
|
|
||||||
impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies<SpeciesMeta> {
|
impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies<SpeciesMeta> {
|
||||||
type IntoIter = std::iter::Copied<std::slice::Iter<'static, Self::Item>>;
|
type IntoIter = std::iter::Copied<std::slice::Iter<'static, Self::Item>>;
|
||||||
|
@ -317,7 +317,9 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSourc
|
|||||||
7 => "common.loot_tables.loot_table_weapon_rare",
|
7 => "common.loot_tables.loot_table_weapon_rare",
|
||||||
_ => "common.loot_tables.loot_table",
|
_ => "common.loot_tables.loot_table",
|
||||||
},
|
},
|
||||||
Some(common::comp::Body::Theropod(_)) => "common.loot_tables.loot_table_animal_parts",
|
Some(common::comp::Body::Theropod(_)) => {
|
||||||
|
"common.loot_tables.loot_table_animal_parts"
|
||||||
|
},
|
||||||
Some(common::comp::Body::Dragon(_)) => "common.loot_tables.loot_table_weapon_rare",
|
Some(common::comp::Body::Dragon(_)) => "common.loot_tables.loot_table_weapon_rare",
|
||||||
Some(common::comp::Body::QuadrupedLow(_)) => match rng.gen_range(0, 3) {
|
Some(common::comp::Body::QuadrupedLow(_)) => match rng.gen_range(0, 3) {
|
||||||
0 => "common.loot_tables.loot_table_food",
|
0 => "common.loot_tables.loot_table_food",
|
||||||
|
@ -61,9 +61,10 @@ impl Animation for FeedAnimation {
|
|||||||
skeleton_attr.head.0,
|
skeleton_attr.head.0,
|
||||||
skeleton_attr.head.1 + slower * 0.2,
|
skeleton_attr.head.1 + slower * 0.2,
|
||||||
);
|
);
|
||||||
next.head.orientation =
|
next.head.orientation = Quaternion::rotation_z(0.3 * look.x)
|
||||||
Quaternion::rotation_z(0.3 * look.x)
|
* Quaternion::rotation_x(
|
||||||
* Quaternion::rotation_x(fast * 0.05 + faster * 0.08 + 0.8 * skeleton_attr.feed.1 * transition);
|
fast * 0.05 + faster * 0.08 + 0.8 * skeleton_attr.feed.1 * transition,
|
||||||
|
);
|
||||||
next.head.scale = Vec3::one();
|
next.head.scale = Vec3::one();
|
||||||
|
|
||||||
next.neck.position = Vec3::new(
|
next.neck.position = Vec3::new(
|
||||||
@ -71,7 +72,8 @@ impl Animation for FeedAnimation {
|
|||||||
skeleton_attr.neck.0,
|
skeleton_attr.neck.0,
|
||||||
skeleton_attr.neck.1 + slower * 0.1 - 4.0 * transition,
|
skeleton_attr.neck.1 + slower * 0.1 - 4.0 * transition,
|
||||||
);
|
);
|
||||||
next.neck.orientation =Quaternion::rotation_x(-2.5 * skeleton_attr.feed.1 * transition);
|
next.neck.orientation =
|
||||||
|
Quaternion::rotation_x(-2.5 * skeleton_attr.feed.1 * transition);
|
||||||
next.neck.scale = Vec3::one() * 1.02;
|
next.neck.scale = Vec3::one() * 1.02;
|
||||||
|
|
||||||
next.jaw.position = Vec3::new(
|
next.jaw.position = Vec3::new(
|
||||||
|
@ -6,7 +6,8 @@ pub mod run;
|
|||||||
|
|
||||||
// Reexports
|
// Reexports
|
||||||
pub use self::{
|
pub use self::{
|
||||||
alpha::AlphaAnimation, feed::FeedAnimation, idle::IdleAnimation, jump::JumpAnimation, run::RunAnimation,
|
alpha::AlphaAnimation, feed::FeedAnimation, idle::IdleAnimation, jump::JumpAnimation,
|
||||||
|
run::RunAnimation,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{make_bone, vek::*, FigureBoneData, Skeleton};
|
use super::{make_bone, vek::*, FigureBoneData, Skeleton};
|
||||||
@ -288,7 +289,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
|||||||
feet_b: match (body.species, body.body_type) {
|
feet_b: match (body.species, body.body_type) {
|
||||||
(Grolgar, _) => (0.5, -1.5, -3.0),
|
(Grolgar, _) => (0.5, -1.5, -3.0),
|
||||||
(Saber, _) => (1.0, -1.0, -1.0),
|
(Saber, _) => (1.0, -1.0, -1.0),
|
||||||
(Tuskram, _) => (0.5,-1.0, -2.5),
|
(Tuskram, _) => (0.5, -1.0, -2.5),
|
||||||
(Lion, _) => (0.5, -1.0, -3.0),
|
(Lion, _) => (0.5, -1.0, -3.0),
|
||||||
(Tarasque, _) => (1.5, -1.0, -2.5),
|
(Tarasque, _) => (1.5, -1.0, -2.5),
|
||||||
(Tiger, _) => (0.5, -1.0, -4.0),
|
(Tiger, _) => (0.5, -1.0, -4.0),
|
||||||
|
@ -115,7 +115,7 @@ impl Animation for IdleAnimation {
|
|||||||
next.foot_l.position = Vec3::new(
|
next.foot_l.position = Vec3::new(
|
||||||
-skeleton_attr.foot.0,
|
-skeleton_attr.foot.0,
|
||||||
skeleton_attr.foot.1,
|
skeleton_attr.foot.1,
|
||||||
skeleton_attr.foot.2 + breathe * -0.35,
|
skeleton_attr.foot.2 + breathe * -0.15,
|
||||||
);
|
);
|
||||||
next.foot_l.orientation = Quaternion::rotation_z(0.0);
|
next.foot_l.orientation = Quaternion::rotation_z(0.0);
|
||||||
next.foot_l.scale = Vec3::one() * 1.02;
|
next.foot_l.scale = Vec3::one() * 1.02;
|
||||||
@ -123,7 +123,7 @@ impl Animation for IdleAnimation {
|
|||||||
next.foot_r.position = Vec3::new(
|
next.foot_r.position = Vec3::new(
|
||||||
skeleton_attr.foot.0,
|
skeleton_attr.foot.0,
|
||||||
skeleton_attr.foot.1,
|
skeleton_attr.foot.1,
|
||||||
skeleton_attr.foot.2 + breathe * -0.45,
|
skeleton_attr.foot.2 + breathe * -0.15,
|
||||||
);
|
);
|
||||||
next.foot_r.orientation = Quaternion::rotation_z(0.0);
|
next.foot_r.orientation = Quaternion::rotation_z(0.0);
|
||||||
next.foot_r.scale = Vec3::one() * 1.02;
|
next.foot_r.scale = Vec3::one() * 1.02;
|
||||||
|
@ -116,43 +116,43 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
|||||||
Self {
|
Self {
|
||||||
head: match (body.species, body.body_type) {
|
head: match (body.species, body.body_type) {
|
||||||
(Archaeos, _) => (8.0, 4.0),
|
(Archaeos, _) => (8.0, 4.0),
|
||||||
(Odontotyrannos, _) => (-2.5, 3.0),
|
(Odonto, _) => (-1.0, 5.0),
|
||||||
},
|
},
|
||||||
jaw: match (body.species, body.body_type) {
|
jaw: match (body.species, body.body_type) {
|
||||||
(Archaeos, _) => (1.0, -7.0),
|
(Archaeos, _) => (1.0, -7.0),
|
||||||
(Odontotyrannos, _) => (1.0, -7.0),
|
(Odonto, _) => (2.0, -7.0),
|
||||||
},
|
},
|
||||||
neck: match (body.species, body.body_type) {
|
neck: match (body.species, body.body_type) {
|
||||||
(Archaeos, _) => (4.5, -2.0),
|
(Archaeos, _) => (4.5, -2.0),
|
||||||
(Odontotyrannos, _) => (4.5, -2.0),
|
(Odonto, _) => (4.5, -2.0),
|
||||||
},
|
},
|
||||||
chest_front: match (body.species, body.body_type) {
|
chest_front: match (body.species, body.body_type) {
|
||||||
(Archaeos, _) => (0.0, 20.0),
|
(Archaeos, _) => (0.0, 20.0),
|
||||||
(Odontotyrannos, _) => (0.0, 9.0),
|
(Odonto, _) => (0.0, 13.0),
|
||||||
},
|
},
|
||||||
chest_back: match (body.species, body.body_type) {
|
chest_back: match (body.species, body.body_type) {
|
||||||
(Archaeos, _) => (-5.5, -1.0),
|
(Archaeos, _) => (-5.5, -1.0),
|
||||||
(Odontotyrannos, _) => (-5.0, 2.0),
|
(Odonto, _) => (-5.0, 2.0),
|
||||||
},
|
},
|
||||||
tail_front: match (body.species, body.body_type) {
|
tail_front: match (body.species, body.body_type) {
|
||||||
(Archaeos, _) => (-9.0, -1.5),
|
(Archaeos, _) => (-9.0, -1.5),
|
||||||
(Odontotyrannos, _) => (-8.0, -1.0),
|
(Odonto, _) => (-7.0, -1.0),
|
||||||
},
|
},
|
||||||
tail_back: match (body.species, body.body_type) {
|
tail_back: match (body.species, body.body_type) {
|
||||||
(Archaeos, _) => (-8.0, -0.5),
|
(Archaeos, _) => (-8.0, -0.5),
|
||||||
(Odontotyrannos, _) => (-12.0, -1.5),
|
(Odonto, _) => (-8.0, 0.5),
|
||||||
},
|
},
|
||||||
hand: match (body.species, body.body_type) {
|
hand: match (body.species, body.body_type) {
|
||||||
(Archaeos, _) => (3.0, 0.0, -4.0),
|
(Archaeos, _) => (3.0, 0.0, -4.0),
|
||||||
(Odontotyrannos, _) => (3.5, 3.0, -4.0),
|
(Odonto, _) => (3.5, 3.0, -4.0),
|
||||||
},
|
},
|
||||||
leg: match (body.species, body.body_type) {
|
leg: match (body.species, body.body_type) {
|
||||||
(Archaeos, _) => (4.5, -3.0, -4.0),
|
(Archaeos, _) => (4.5, -3.0, -4.0),
|
||||||
(Odontotyrannos, _) => (5.5, -2.5, -2.0),
|
(Odonto, _) => (5.5, -2.5, -4.0),
|
||||||
},
|
},
|
||||||
foot: match (body.species, body.body_type) {
|
foot: match (body.species, body.body_type) {
|
||||||
(Archaeos, _) => (1.0, -0.5, -7.0),
|
(Archaeos, _) => (1.0, -0.5, -7.0),
|
||||||
(Odontotyrannos, _) => (-1.0, -6.5, -3.0),
|
(Odonto, _) => (2.0, -6.5, -3.0),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1916,11 +1916,7 @@ impl TheropodCentralSpec {
|
|||||||
(central, Vec3::from(spec.chest_back.offset))
|
(central, Vec3::from(spec.chest_back.offset))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn mesh_tail_front(
|
fn mesh_tail_front(&self, species: TSpecies, body_type: TBodyType) -> BoneMeshes {
|
||||||
&self,
|
|
||||||
species: TSpecies,
|
|
||||||
body_type: TBodyType,
|
|
||||||
) -> BoneMeshes {
|
|
||||||
let spec = match self.0.get(&(species, body_type)) {
|
let spec = match self.0.get(&(species, body_type)) {
|
||||||
Some(spec) => spec,
|
Some(spec) => spec,
|
||||||
None => {
|
None => {
|
||||||
@ -1936,11 +1932,7 @@ impl TheropodCentralSpec {
|
|||||||
(central, Vec3::from(spec.tail_front.offset))
|
(central, Vec3::from(spec.tail_front.offset))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn mesh_tail_back(
|
fn mesh_tail_back(&self, species: TSpecies, body_type: TBodyType) -> BoneMeshes {
|
||||||
&self,
|
|
||||||
species: TSpecies,
|
|
||||||
body_type: TBodyType,
|
|
||||||
) -> BoneMeshes {
|
|
||||||
let spec = match self.0.get(&(species, body_type)) {
|
let spec = match self.0.get(&(species, body_type)) {
|
||||||
Some(spec) => spec,
|
Some(spec) => spec,
|
||||||
None => {
|
None => {
|
||||||
@ -1957,11 +1949,7 @@ impl TheropodCentralSpec {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl TheropodLateralSpec {
|
impl TheropodLateralSpec {
|
||||||
fn mesh_hand_l(
|
fn mesh_hand_l(&self, species: TSpecies, body_type: TBodyType) -> BoneMeshes {
|
||||||
&self,
|
|
||||||
species: TSpecies,
|
|
||||||
body_type: TBodyType,
|
|
||||||
) -> BoneMeshes {
|
|
||||||
let spec = match self.0.get(&(species, body_type)) {
|
let spec = match self.0.get(&(species, body_type)) {
|
||||||
Some(spec) => spec,
|
Some(spec) => spec,
|
||||||
None => {
|
None => {
|
||||||
@ -1977,11 +1965,7 @@ impl TheropodLateralSpec {
|
|||||||
(lateral, Vec3::from(spec.hand_l.offset))
|
(lateral, Vec3::from(spec.hand_l.offset))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn mesh_hand_r(
|
fn mesh_hand_r(&self, species: TSpecies, body_type: TBodyType) -> BoneMeshes {
|
||||||
&self,
|
|
||||||
species: TSpecies,
|
|
||||||
body_type: TBodyType,
|
|
||||||
) -> BoneMeshes {
|
|
||||||
let spec = match self.0.get(&(species, body_type)) {
|
let spec = match self.0.get(&(species, body_type)) {
|
||||||
Some(spec) => spec,
|
Some(spec) => spec,
|
||||||
None => {
|
None => {
|
||||||
@ -1997,11 +1981,7 @@ impl TheropodLateralSpec {
|
|||||||
(lateral, Vec3::from(spec.hand_r.offset))
|
(lateral, Vec3::from(spec.hand_r.offset))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn mesh_leg_l(
|
fn mesh_leg_l(&self, species: TSpecies, body_type: TBodyType) -> BoneMeshes {
|
||||||
&self,
|
|
||||||
species: TSpecies,
|
|
||||||
body_type: TBodyType,
|
|
||||||
) -> BoneMeshes {
|
|
||||||
let spec = match self.0.get(&(species, body_type)) {
|
let spec = match self.0.get(&(species, body_type)) {
|
||||||
Some(spec) => spec,
|
Some(spec) => spec,
|
||||||
None => {
|
None => {
|
||||||
@ -2017,11 +1997,7 @@ impl TheropodLateralSpec {
|
|||||||
(lateral, Vec3::from(spec.leg_l.offset))
|
(lateral, Vec3::from(spec.leg_l.offset))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn mesh_leg_r(
|
fn mesh_leg_r(&self, species: TSpecies, body_type: TBodyType) -> BoneMeshes {
|
||||||
&self,
|
|
||||||
species: TSpecies,
|
|
||||||
body_type: TBodyType,
|
|
||||||
) -> BoneMeshes {
|
|
||||||
let spec = match self.0.get(&(species, body_type)) {
|
let spec = match self.0.get(&(species, body_type)) {
|
||||||
Some(spec) => spec,
|
Some(spec) => spec,
|
||||||
None => {
|
None => {
|
||||||
@ -2037,11 +2013,7 @@ impl TheropodLateralSpec {
|
|||||||
(lateral, Vec3::from(spec.leg_r.offset))
|
(lateral, Vec3::from(spec.leg_r.offset))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn mesh_foot_l(
|
fn mesh_foot_l(&self, species: TSpecies, body_type: TBodyType) -> BoneMeshes {
|
||||||
&self,
|
|
||||||
species: TSpecies,
|
|
||||||
body_type: TBodyType,
|
|
||||||
) -> BoneMeshes {
|
|
||||||
let spec = match self.0.get(&(species, body_type)) {
|
let spec = match self.0.get(&(species, body_type)) {
|
||||||
Some(spec) => spec,
|
Some(spec) => spec,
|
||||||
None => {
|
None => {
|
||||||
@ -2057,11 +2029,7 @@ impl TheropodLateralSpec {
|
|||||||
(lateral, Vec3::from(spec.foot_l.offset))
|
(lateral, Vec3::from(spec.foot_l.offset))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn mesh_foot_r(
|
fn mesh_foot_r(&self, species: TSpecies, body_type: TBodyType) -> BoneMeshes {
|
||||||
&self,
|
|
||||||
species: TSpecies,
|
|
||||||
body_type: TBodyType,
|
|
||||||
) -> BoneMeshes {
|
|
||||||
let spec = match self.0.get(&(species, body_type)) {
|
let spec = match self.0.get(&(species, body_type)) {
|
||||||
Some(spec) => spec,
|
Some(spec) => spec,
|
||||||
None => {
|
None => {
|
||||||
@ -3103,11 +3071,7 @@ impl GolemCentralSpec {
|
|||||||
(central, Vec3::from(spec.torso_upper.offset))
|
(central, Vec3::from(spec.torso_upper.offset))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn mesh_torso_lower(
|
pub fn mesh_torso_lower(&self, species: GSpecies, body_type: GBodyType) -> BoneMeshes {
|
||||||
&self,
|
|
||||||
species: GSpecies,
|
|
||||||
body_type: GBodyType,
|
|
||||||
) -> BoneMeshes {
|
|
||||||
let spec = match self.0.get(&(species, body_type)) {
|
let spec = match self.0.get(&(species, body_type)) {
|
||||||
Some(spec) => spec,
|
Some(spec) => spec,
|
||||||
None => {
|
None => {
|
||||||
|
@ -35,7 +35,7 @@ use crate::{
|
|||||||
util::{Grid, Sampler},
|
util::{Grid, Sampler},
|
||||||
};
|
};
|
||||||
use common::{
|
use common::{
|
||||||
comp::{self, bird_medium, quadruped_low, quadruped_medium, quadruped_small, theropod},
|
comp::{self, bird_medium, quadruped_low, quadruped_medium, quadruped_small},
|
||||||
generation::{ChunkSupplement, EntityInfo},
|
generation::{ChunkSupplement, EntityInfo},
|
||||||
msg::server::WorldMapMsg,
|
msg::server::WorldMapMsg,
|
||||||
terrain::{Block, BlockKind, TerrainChunk, TerrainChunkMeta, TerrainChunkSize},
|
terrain::{Block, BlockKind, TerrainChunk, TerrainChunkMeta, TerrainChunkSize},
|
||||||
@ -256,10 +256,6 @@ impl World {
|
|||||||
comp::Body::BirdMedium(bird_medium::Body::random())
|
comp::Body::BirdMedium(bird_medium::Body::random())
|
||||||
},
|
},
|
||||||
2 => {
|
2 => {
|
||||||
is_hostile = true;
|
|
||||||
comp::Body::Theropod(theropod::Body::random())
|
|
||||||
},
|
|
||||||
3 => {
|
|
||||||
match quadlow {
|
match quadlow {
|
||||||
comp::Body::QuadrupedLow(quadruped_low) => {
|
comp::Body::QuadrupedLow(quadruped_low) => {
|
||||||
match quadruped_low.species {
|
match quadruped_low.species {
|
||||||
|
Loading…
Reference in New Issue
Block a user