mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Char fixes
This commit is contained in:
parent
523c1b0b03
commit
cef52a0440
BIN
assets/voxygen/voxel/figure/head/head_elf_male.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/figure/head/head_elf_male.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/figure/head/head_human_male.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/figure/head/head_human_male.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/figure/head/head_undead_female.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/figure/head/head_undead_female.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/figure/head/head_undead_male.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/figure/head/head_undead_male.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/figure/head_danari_female.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/figure/head_danari_female.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/figure/head_danari_male.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/figure/head_danari_male.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/figure/head_dwarf_female.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/figure/head_dwarf_female.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/figure/head_dwarf_male.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/figure/head_dwarf_male.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/figure/head_elf_female.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/figure/head_elf_female.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/figure/head_elf_male.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/figure/head_elf_male.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/figure/head_female.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/figure/head_female.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/figure/head_human_female.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/figure/head_human_female.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/figure/head_human_male.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/figure/head_human_male.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/figure/head_orc_female.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/figure/head_orc_female.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/figure/head_orc_male.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/figure/head_orc_male.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/figure/head_undead_female.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/figure/head_undead_female.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/figure/head_undead_male.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/figure/head_undead_male.vox
(Stored with Git LFS)
Binary file not shown.
@ -15,7 +15,6 @@ pub enum Race {
|
||||
pub enum BodyType {
|
||||
Female,
|
||||
Male,
|
||||
Unspecified,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
@ -156,7 +155,7 @@ pub const ALL_RACES: [Race; 6] = [
|
||||
Race::Orc,
|
||||
Race::Undead,
|
||||
];
|
||||
pub const ALL_BODY_TYPES: [BodyType; 3] = [BodyType::Female, BodyType::Male, BodyType::Unspecified];
|
||||
pub const ALL_BODY_TYPES: [BodyType; 2] = [BodyType::Female, BodyType::Male];
|
||||
pub const ALL_CHESTS: [Chest; 5] = [
|
||||
Chest::Blue,
|
||||
Chest::Brown,
|
||||
@ -221,7 +220,7 @@ impl HumanoidBody {
|
||||
}
|
||||
}
|
||||
///////////
|
||||
const ALL_QBODY_TYPES: [BodyType; 3] = [BodyType::Female, BodyType::Male, BodyType::Unspecified];
|
||||
const ALL_QBODY_TYPES: [BodyType; 2] = [BodyType::Female, BodyType::Male];
|
||||
const ALL_QPIG_HEADS: [PigHead; 1] = [PigHead::Default];
|
||||
const ALL_QPIG_CHESTS: [PigChest; 1] = [PigChest::Default];
|
||||
const ALL_QPIG_LEG_LS: [PigLegL; 1] = [PigLegL::Default];
|
||||
@ -249,7 +248,7 @@ impl QuadrupedBody {
|
||||
}
|
||||
}
|
||||
/////////////
|
||||
const ALL_QMBODY_TYPES: [BodyType; 3] = [BodyType::Female, BodyType::Male, BodyType::Unspecified];
|
||||
const ALL_QMBODY_TYPES: [BodyType; 2] = [BodyType::Female, BodyType::Male];
|
||||
const ALL_QMWOLF_HEADS_UPPER: [WolfHeadUpper; 1] = [WolfHeadUpper::Default];
|
||||
const ALL_QMWOLF_JAWS: [WolfJaw; 1] = [WolfJaw::Default];
|
||||
const ALL_QMWOLF_HEADS_LOWER: [WolfHeadLower; 1] = [WolfHeadLower::Default];
|
||||
|
@ -29,7 +29,7 @@ impl Animation for AttackAnimation {
|
||||
let wave_stop_quick = (anim_time as f32 * 16.0).min(PI / 2.0).sin();
|
||||
|
||||
next.head.offset = Vec3::new(
|
||||
0.0,
|
||||
0.0 + skeleton_attr.neck_right,
|
||||
0.0 + skeleton_attr.neck_forward,
|
||||
skeleton_attr.neck_height + 15.0,
|
||||
);
|
||||
|
@ -40,7 +40,7 @@ impl Animation for GlidingAnimation {
|
||||
* 0.25,
|
||||
);
|
||||
next.head.offset = Vec3::new(
|
||||
0.0,
|
||||
0.0 + skeleton_attr.neck_right,
|
||||
0.0 + skeleton_attr.neck_forward,
|
||||
skeleton_attr.neck_height + 6.0,
|
||||
);
|
||||
|
@ -40,7 +40,7 @@ impl Animation for IdleAnimation {
|
||||
* 0.25,
|
||||
);
|
||||
next.head.offset = Vec3::new(
|
||||
0.0,
|
||||
0.0 + skeleton_attr.neck_right,
|
||||
0.0 + skeleton_attr.neck_forward,
|
||||
skeleton_attr.neck_height + 15.0 + wave_ultra_slow * 0.3,
|
||||
);
|
||||
|
@ -24,7 +24,7 @@ impl Animation for JumpAnimation {
|
||||
let wave_stop_alt = (anim_time as f32 * 5.0).min(PI / 2.0).sin();
|
||||
|
||||
next.head.offset = Vec3::new(
|
||||
0.0,
|
||||
0.0 + skeleton_attr.neck_right,
|
||||
0.0 + skeleton_attr.neck_forward,
|
||||
skeleton_attr.neck_height + 15.0,
|
||||
);
|
||||
|
@ -27,7 +27,7 @@ impl Animation for RollAnimation {
|
||||
let wave_dub = (anim_time as f32 * 5.5).sin();
|
||||
|
||||
next.head.offset = Vec3::new(
|
||||
0.0,
|
||||
0.0 + skeleton_attr.neck_right,
|
||||
-2.0 + wave_slow * -3.0 + skeleton_attr.neck_forward,
|
||||
skeleton_attr.neck_height + 9.0 + wave_dub * -5.0,
|
||||
);
|
||||
|
@ -51,6 +51,7 @@ pub struct SkeletonAttr {
|
||||
head_scale: f32,
|
||||
neck_height: f32,
|
||||
neck_forward: f32,
|
||||
neck_right: f32,
|
||||
weapon_x: f32,
|
||||
weapon_y: f32,
|
||||
}
|
||||
@ -62,6 +63,7 @@ impl Default for SkeletonAttr {
|
||||
head_scale: 1.0,
|
||||
neck_height: 1.0,
|
||||
neck_forward: 1.0,
|
||||
neck_right: 1.0,
|
||||
weapon_x: 1.0,
|
||||
weapon_y: 1.0,
|
||||
}
|
||||
@ -76,23 +78,23 @@ impl<'a> From<&'a HumanoidBody> for SkeletonAttr {
|
||||
(Race::Orc, BodyType::Female) => 1.0,
|
||||
(Race::Human, BodyType::Male) => 1.0,
|
||||
(Race::Human, BodyType::Female) => 0.90,
|
||||
(Race::Elf, BodyType::Male) => 1.10,
|
||||
(Race::Elf, BodyType::Male) => 1.0,
|
||||
(Race::Elf, BodyType::Female) => 1.0,
|
||||
(Race::Dwarf, BodyType::Male) => 0.92,
|
||||
(Race::Dwarf, BodyType::Female) => 0.89,
|
||||
(Race::Undead, BodyType::Male) => 1.0,
|
||||
(Race::Undead, BodyType::Female) => 0.90,
|
||||
(Race::Undead, BodyType::Male) => 0.98,
|
||||
(Race::Undead, BodyType::Female) => 0.93,
|
||||
(Race::Danari, BodyType::Male) => 0.85,
|
||||
(Race::Danari, BodyType::Female) => 0.82,
|
||||
_ => 1.0,
|
||||
},
|
||||
head_scale: match (body.race, body.body_type) {
|
||||
(Race::Orc, BodyType::Male) => 0.9,
|
||||
(Race::Orc, BodyType::Female) => 0.88,
|
||||
(Race::Orc, BodyType::Female) => 1.0,
|
||||
(Race::Human, BodyType::Male) => 1.0,
|
||||
(Race::Human, BodyType::Female) => 1.0,
|
||||
(Race::Elf, BodyType::Male) => 0.9,
|
||||
(Race::Elf, BodyType::Female) => 0.9,
|
||||
(Race::Elf, BodyType::Male) => 1.0,
|
||||
(Race::Elf, BodyType::Female) => 1.0,
|
||||
(Race::Dwarf, BodyType::Male) => 1.0,
|
||||
(Race::Dwarf, BodyType::Female) => 1.0,
|
||||
(Race::Undead, BodyType::Male) => 1.0,
|
||||
@ -102,35 +104,50 @@ impl<'a> From<&'a HumanoidBody> for SkeletonAttr {
|
||||
_ => 1.0,
|
||||
},
|
||||
neck_height: match (body.race, body.body_type) {
|
||||
(Race::Orc, BodyType::Male) => -1.0,
|
||||
(Race::Orc, BodyType::Male) => -2.0,
|
||||
(Race::Orc, BodyType::Female) => -2.0,
|
||||
(Race::Human, BodyType::Male) => 0.0,
|
||||
(Race::Human, BodyType::Male) => 6.0,
|
||||
(Race::Human, BodyType::Female) => -2.0,
|
||||
(Race::Elf, BodyType::Male) => -0.5,
|
||||
(Race::Elf, BodyType::Female) => -1.5,
|
||||
(Race::Elf, BodyType::Male) => 0.75,
|
||||
(Race::Elf, BodyType::Female) => -1.25,
|
||||
(Race::Dwarf, BodyType::Male) => -0.0,
|
||||
(Race::Dwarf, BodyType::Female) => -1.0,
|
||||
(Race::Undead, BodyType::Male) => -1.0,
|
||||
(Race::Undead, BodyType::Female) => -1.0,
|
||||
(Race::Undead, BodyType::Female) => -0.5,
|
||||
(Race::Danari, BodyType::Male) => 0.5,
|
||||
(Race::Danari, BodyType::Female) => -0.5,
|
||||
_ => 1.0,
|
||||
},
|
||||
neck_forward: match (body.race, body.body_type) {
|
||||
(Race::Orc, BodyType::Male) => -1.0,
|
||||
(Race::Orc, BodyType::Female) => 2.0,
|
||||
(Race::Human, BodyType::Male) => 1.0,
|
||||
(Race::Human, BodyType::Female) => 1.0,
|
||||
(Race::Elf, BodyType::Male) => -0.5,
|
||||
(Race::Orc, BodyType::Male) => 1.0,
|
||||
(Race::Orc, BodyType::Female) => -1.0,
|
||||
(Race::Human, BodyType::Male) => 0.0,
|
||||
(Race::Human, BodyType::Female) => -1.0,
|
||||
(Race::Elf, BodyType::Male) => 1.75,
|
||||
(Race::Elf, BodyType::Female) => -0.5,
|
||||
(Race::Dwarf, BodyType::Male) => 0.0,
|
||||
(Race::Dwarf, BodyType::Female) => 2.0,
|
||||
(Race::Dwarf, BodyType::Male) => 2.0,
|
||||
(Race::Dwarf, BodyType::Female) => 0.0,
|
||||
(Race::Undead, BodyType::Male) => 1.0,
|
||||
(Race::Undead, BodyType::Female) => 1.0,
|
||||
(Race::Danari, BodyType::Male) => 0.5,
|
||||
(Race::Danari, BodyType::Female) => 0.0,
|
||||
_ => 1.0,
|
||||
},
|
||||
neck_right: match (body.race, body.body_type) {
|
||||
(Race::Orc, BodyType::Male) => 0.0,
|
||||
(Race::Orc, BodyType::Female) => 0.0,
|
||||
(Race::Human, BodyType::Male) => 0.0,
|
||||
(Race::Human, BodyType::Female) => 0.0,
|
||||
(Race::Elf, BodyType::Male) => -1.0,
|
||||
(Race::Elf, BodyType::Female) => 0.25,
|
||||
(Race::Dwarf, BodyType::Male) => 0.0,
|
||||
(Race::Dwarf, BodyType::Female) => 0.0,
|
||||
(Race::Undead, BodyType::Male) => -0.5,
|
||||
(Race::Undead, BodyType::Female) => 0.0,
|
||||
(Race::Danari, BodyType::Male) => 0.0,
|
||||
(Race::Danari, BodyType::Female) => 0.0,
|
||||
_ => 1.0,
|
||||
},
|
||||
weapon_x: match body.weapon {
|
||||
Weapon::Sword => 0.0,
|
||||
Weapon::Axe => 3.0,
|
||||
@ -143,7 +160,7 @@ impl<'a> From<&'a HumanoidBody> for SkeletonAttr {
|
||||
_ => 1.0,
|
||||
},
|
||||
weapon_y: match body.weapon {
|
||||
Weapon::Sword => -1.0,
|
||||
Weapon::Sword => -1.25,
|
||||
Weapon::Axe => 0.0,
|
||||
Weapon::Hammer => -2.0,
|
||||
Weapon::SwordShield => 0.0,
|
||||
|
@ -721,17 +721,17 @@ impl CharSelectionUi {
|
||||
self.imgs.icon_border
|
||||
})
|
||||
.middle_of(self.ids.hammer)
|
||||
//.hover_image(self.imgs.icon_border_mo)
|
||||
//.press_image(self.imgs.icon_border_press)
|
||||
.hover_image(self.imgs.icon_border_mo)
|
||||
.press_image(self.imgs.icon_border_press)
|
||||
.set(self.ids.hammer_button, ui_widgets)
|
||||
.was_clicked()
|
||||
{
|
||||
//self.character_body.weapon = Weapon::Hammer;
|
||||
self.character_body.weapon = Weapon::Hammer;
|
||||
}
|
||||
// REMOVE THIS AFTER IMPLEMENTATION
|
||||
Rectangle::fill_with([67.0, 67.0], color::rgba(0.0, 0.0, 0.0, 0.8))
|
||||
.middle_of(self.ids.hammer)
|
||||
.set(self.ids.hammer_grey, ui_widgets);
|
||||
/*Rectangle::fill_with([67.0, 67.0], color::rgba(0.0, 0.0, 0.0, 0.8))
|
||||
.middle_of(self.ids.hammer)
|
||||
.set(self.ids.hammer_grey, ui_widgets);*/
|
||||
|
||||
// Bow
|
||||
|
||||
@ -830,17 +830,17 @@ impl CharSelectionUi {
|
||||
self.imgs.icon_border
|
||||
})
|
||||
.middle_of(self.ids.axe)
|
||||
//.hover_image(self.imgs.icon_border_mo)
|
||||
//.press_image(self.imgs.icon_border_press)
|
||||
.hover_image(self.imgs.icon_border_mo)
|
||||
.press_image(self.imgs.icon_border_press)
|
||||
.set(self.ids.axe_button, ui_widgets)
|
||||
.was_clicked()
|
||||
{
|
||||
//self.character_body.weapon = Weapon::Axe;
|
||||
self.character_body.weapon = Weapon::Axe;
|
||||
}
|
||||
// REMOVE THIS AFTER IMPLEMENTATION
|
||||
Rectangle::fill_with([67.0, 67.0], color::rgba(0.0, 0.0, 0.0, 0.8))
|
||||
.middle_of(self.ids.axe)
|
||||
.set(self.ids.axe_grey, ui_widgets);
|
||||
/*Rectangle::fill_with([67.0, 67.0], color::rgba(0.0, 0.0, 0.0, 0.8))
|
||||
.middle_of(self.ids.axe)
|
||||
.set(self.ids.axe_grey, ui_widgets);*/
|
||||
|
||||
// Sliders
|
||||
|
||||
|
@ -170,7 +170,7 @@ impl FigureModelCache {
|
||||
),
|
||||
(Race::Elf, BodyType::Male) => (
|
||||
"figure/head/head_elf_male.vox",
|
||||
Vec3::new(-9.0, -6.5, -3.75),
|
||||
Vec3::new(-7.0, -6.5, -3.75),
|
||||
),
|
||||
(Race::Elf, BodyType::Female) => (
|
||||
"figure/head/head_elf_female.vox",
|
||||
@ -210,7 +210,10 @@ impl FigureModelCache {
|
||||
),
|
||||
_ => {
|
||||
warn!("Invalid race, body_type combination for figure head");
|
||||
("figure/head/head_human_male", Vec3::new(-7.0, -7.0, -9.25))
|
||||
(
|
||||
"figure/head/head_human_male.vox",
|
||||
Vec3::new(-7.0, -5.5, -9.25),
|
||||
)
|
||||
}
|
||||
};
|
||||
Self::load_mesh(name, offset)
|
||||
|
Loading…
Reference in New Issue
Block a user