diff --git a/assets/voxygen/voxel/npc/cardinalfish/tail.vox b/assets/voxygen/voxel/npc/cardinalfish/tail.vox new file mode 100644 index 0000000000..c58fe81db3 --- /dev/null +++ b/assets/voxygen/voxel/npc/cardinalfish/tail.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2d294e515c61b0bce7eb81609e611b24a89d4543a81328cee03b41f22b86980 +size 1320 diff --git a/assets/voxygen/voxel/npc/cardinalfish/torso.vox b/assets/voxygen/voxel/npc/cardinalfish/torso.vox new file mode 100644 index 0000000000..b9ce93fc17 --- /dev/null +++ b/assets/voxygen/voxel/npc/cardinalfish/torso.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f36f0d362133bfaf0a04262abc05d0acbe34949f0b202c5c676fa33adb0fe553 +size 2100 diff --git a/assets/voxygen/voxel/npc/crow/head.vox b/assets/voxygen/voxel/npc/crow/head.vox new file mode 100644 index 0000000000..f14dcf709f --- /dev/null +++ b/assets/voxygen/voxel/npc/crow/head.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c427b188ca4275197e9dc80716a0b67d66327d1a095d22ba9333e806c3bb18b +size 1420 diff --git a/assets/voxygen/voxel/npc/crow/torso.vox b/assets/voxygen/voxel/npc/crow/torso.vox new file mode 100644 index 0000000000..c7fc172c57 --- /dev/null +++ b/assets/voxygen/voxel/npc/crow/torso.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c7174b3c97e19dbbd5c5fe5495841e1a0ad0ea2f7ac249440df8ea5d0950beb +size 2900 diff --git a/assets/voxygen/voxel/npc/crow/wing_l.vox b/assets/voxygen/voxel/npc/crow/wing_l.vox new file mode 100644 index 0000000000..757d9ba333 --- /dev/null +++ b/assets/voxygen/voxel/npc/crow/wing_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f5e5670531fabc51dc1f5578c555ee96b2ec19b71df51b662685ed92935ccc2 +size 1292 diff --git a/assets/voxygen/voxel/npc/crow/wing_r.vox b/assets/voxygen/voxel/npc/crow/wing_r.vox new file mode 100644 index 0000000000..757d9ba333 --- /dev/null +++ b/assets/voxygen/voxel/npc/crow/wing_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f5e5670531fabc51dc1f5578c555ee96b2ec19b71df51b662685ed92935ccc2 +size 1292 diff --git a/assets/voxygen/voxel/npc/dragon/dragon_chest_front.vox b/assets/voxygen/voxel/npc/dragon/chest_front.vox similarity index 100% rename from assets/voxygen/voxel/npc/dragon/dragon_chest_front.vox rename to assets/voxygen/voxel/npc/dragon/chest_front.vox diff --git a/assets/voxygen/voxel/npc/dragon/dragon_chest_rear.vox b/assets/voxygen/voxel/npc/dragon/chest_rear.vox similarity index 100% rename from assets/voxygen/voxel/npc/dragon/dragon_chest_rear.vox rename to assets/voxygen/voxel/npc/dragon/chest_rear.vox diff --git a/assets/voxygen/voxel/npc/dragon/dragon_foot_bl.vox b/assets/voxygen/voxel/npc/dragon/foot_bl.vox similarity index 100% rename from assets/voxygen/voxel/npc/dragon/dragon_foot_bl.vox rename to assets/voxygen/voxel/npc/dragon/foot_bl.vox diff --git a/assets/voxygen/voxel/npc/dragon/dragon_foot_br.vox b/assets/voxygen/voxel/npc/dragon/foot_br.vox similarity index 100% rename from assets/voxygen/voxel/npc/dragon/dragon_foot_br.vox rename to assets/voxygen/voxel/npc/dragon/foot_br.vox diff --git a/assets/voxygen/voxel/npc/dragon/dragon_foot_fl.vox b/assets/voxygen/voxel/npc/dragon/foot_fl.vox similarity index 100% rename from assets/voxygen/voxel/npc/dragon/dragon_foot_fl.vox rename to assets/voxygen/voxel/npc/dragon/foot_fl.vox diff --git a/assets/voxygen/voxel/npc/dragon/dragon_foot_fr.vox b/assets/voxygen/voxel/npc/dragon/foot_fr.vox similarity index 100% rename from assets/voxygen/voxel/npc/dragon/dragon_foot_fr.vox rename to assets/voxygen/voxel/npc/dragon/foot_fr.vox diff --git a/assets/voxygen/voxel/npc/dragon/dragon_head.vox b/assets/voxygen/voxel/npc/dragon/head.vox similarity index 100% rename from assets/voxygen/voxel/npc/dragon/dragon_head.vox rename to assets/voxygen/voxel/npc/dragon/head.vox diff --git a/assets/voxygen/voxel/npc/dragon/dragon_tail_front.vox b/assets/voxygen/voxel/npc/dragon/tail_front.vox similarity index 100% rename from assets/voxygen/voxel/npc/dragon/dragon_tail_front.vox rename to assets/voxygen/voxel/npc/dragon/tail_front.vox diff --git a/assets/voxygen/voxel/npc/dragon/dragon_tail_rear.vox b/assets/voxygen/voxel/npc/dragon/tail_rear.vox similarity index 100% rename from assets/voxygen/voxel/npc/dragon/dragon_tail_rear.vox rename to assets/voxygen/voxel/npc/dragon/tail_rear.vox diff --git a/assets/voxygen/voxel/npc/dragon/dragon_wing_in_l.vox b/assets/voxygen/voxel/npc/dragon/wing_in_l.vox similarity index 100% rename from assets/voxygen/voxel/npc/dragon/dragon_wing_in_l.vox rename to assets/voxygen/voxel/npc/dragon/wing_in_l.vox diff --git a/assets/voxygen/voxel/npc/dragon/dragon_wing_in_r.vox b/assets/voxygen/voxel/npc/dragon/wing_in_r.vox similarity index 100% rename from assets/voxygen/voxel/npc/dragon/dragon_wing_in_r.vox rename to assets/voxygen/voxel/npc/dragon/wing_in_r.vox diff --git a/assets/voxygen/voxel/npc/dragon/dragon_wing_out_l.vox b/assets/voxygen/voxel/npc/dragon/wing_out_l.vox similarity index 100% rename from assets/voxygen/voxel/npc/dragon/dragon_wing_out_l.vox rename to assets/voxygen/voxel/npc/dragon/wing_out_l.vox diff --git a/assets/voxygen/voxel/npc/dragon/dragon_wing_out_r.vox b/assets/voxygen/voxel/npc/dragon/wing_out_r.vox similarity index 100% rename from assets/voxygen/voxel/npc/dragon/dragon_wing_out_r.vox rename to assets/voxygen/voxel/npc/dragon/wing_out_r.vox diff --git a/assets/voxygen/voxel/npc/duck_m/duck_m_body.vox b/assets/voxygen/voxel/npc/duck_m/body.vox similarity index 100% rename from assets/voxygen/voxel/npc/duck_m/duck_m_body.vox rename to assets/voxygen/voxel/npc/duck_m/body.vox diff --git a/assets/voxygen/voxel/npc/duck_m/duck_m_head.vox b/assets/voxygen/voxel/npc/duck_m/head.vox similarity index 100% rename from assets/voxygen/voxel/npc/duck_m/duck_m_head.vox rename to assets/voxygen/voxel/npc/duck_m/head.vox diff --git a/assets/voxygen/voxel/npc/duck_m/duck_m_leg_l.vox b/assets/voxygen/voxel/npc/duck_m/leg_l.vox similarity index 100% rename from assets/voxygen/voxel/npc/duck_m/duck_m_leg_l.vox rename to assets/voxygen/voxel/npc/duck_m/leg_l.vox diff --git a/assets/voxygen/voxel/npc/duck_m/duck_m_leg_r.vox b/assets/voxygen/voxel/npc/duck_m/leg_r.vox similarity index 100% rename from assets/voxygen/voxel/npc/duck_m/duck_m_leg_r.vox rename to assets/voxygen/voxel/npc/duck_m/leg_r.vox diff --git a/assets/voxygen/voxel/npc/duck_m/duck_m_tail.vox b/assets/voxygen/voxel/npc/duck_m/tail.vox similarity index 100% rename from assets/voxygen/voxel/npc/duck_m/duck_m_tail.vox rename to assets/voxygen/voxel/npc/duck_m/tail.vox diff --git a/assets/voxygen/voxel/npc/duck_m/duck_m_wing.vox b/assets/voxygen/voxel/npc/duck_m/wing.vox similarity index 100% rename from assets/voxygen/voxel/npc/duck_m/duck_m_wing.vox rename to assets/voxygen/voxel/npc/duck_m/wing.vox diff --git a/assets/voxygen/voxel/npc/knight/foot_l.vox b/assets/voxygen/voxel/npc/knight/foot_l.vox new file mode 100644 index 0000000000..d5946e40ed --- /dev/null +++ b/assets/voxygen/voxel/npc/knight/foot_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ef4829618aa75b7d87bf608eb06c761f03f798912982e2edf971a2999531be8 +size 1388 diff --git a/assets/voxygen/voxel/npc/knight/foot_r.vox b/assets/voxygen/voxel/npc/knight/foot_r.vox new file mode 100644 index 0000000000..83361e2b9e --- /dev/null +++ b/assets/voxygen/voxel/npc/knight/foot_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:634d800724de41dd2755f3c066aa748797aff5c299c620651d736e2a8095772e +size 1388 diff --git a/assets/voxygen/voxel/npc/knight/hand_l.vox b/assets/voxygen/voxel/npc/knight/hand_l.vox new file mode 100644 index 0000000000..d6fb9a604e --- /dev/null +++ b/assets/voxygen/voxel/npc/knight/hand_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:392002386275e85e7fcc9d2174baf9da9d6df8e40818b0aee184c191dfe736a5 +size 1440 diff --git a/assets/voxygen/voxel/npc/knight/hand_r.vox b/assets/voxygen/voxel/npc/knight/hand_r.vox new file mode 100644 index 0000000000..7f297f3cd8 --- /dev/null +++ b/assets/voxygen/voxel/npc/knight/hand_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9257231eac4887eec381a900b743b0b02fae1d626146767b79042c3b6ee135a +size 1432 diff --git a/assets/voxygen/voxel/npc/knight/head.vox b/assets/voxygen/voxel/npc/knight/head.vox new file mode 100644 index 0000000000..70f7667c63 --- /dev/null +++ b/assets/voxygen/voxel/npc/knight/head.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4432921d3f584bdcdf5ea47bb89771532bdaa43a0c2bc65d6ba10f61e7a2f123 +size 3524 diff --git a/assets/voxygen/voxel/npc/knight/leg_l.vox b/assets/voxygen/voxel/npc/knight/leg_l.vox new file mode 100644 index 0000000000..8f200e1f5a --- /dev/null +++ b/assets/voxygen/voxel/npc/knight/leg_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b183b026fdee036061550b9b7fa790e5921ae19a7355b1ff6e478f8a2cdfa489 +size 1776 diff --git a/assets/voxygen/voxel/npc/knight/leg_r.vox b/assets/voxygen/voxel/npc/knight/leg_r.vox new file mode 100644 index 0000000000..c60d410e74 --- /dev/null +++ b/assets/voxygen/voxel/npc/knight/leg_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60563e0e3cf012f3da6f3d5069fd3450cf73c7273b3e2ac55082daa5bc1b0f8b +size 1776 diff --git a/assets/voxygen/voxel/npc/knight/lower_torso.vox b/assets/voxygen/voxel/npc/knight/lower_torso.vox new file mode 100644 index 0000000000..e04193bc0b --- /dev/null +++ b/assets/voxygen/voxel/npc/knight/lower_torso.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a9f2658e6da77d24671ea4375f24703714b1d9ed0d6e035dbddefe4fc595393 +size 4260 diff --git a/assets/voxygen/voxel/npc/knight/shoulder_l.vox b/assets/voxygen/voxel/npc/knight/shoulder_l.vox new file mode 100644 index 0000000000..f227e0e4db --- /dev/null +++ b/assets/voxygen/voxel/npc/knight/shoulder_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11e0fcaef237348c3a7d2375f3714d62ee9e0f707a189612f600eac506dffc3e +size 1748 diff --git a/assets/voxygen/voxel/npc/knight/shoulder_r.vox b/assets/voxygen/voxel/npc/knight/shoulder_r.vox new file mode 100644 index 0000000000..624d5be848 --- /dev/null +++ b/assets/voxygen/voxel/npc/knight/shoulder_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f03637a6b4574d0554473e9d971a595ba09053d732beea48d03388c613b558c +size 1748 diff --git a/assets/voxygen/voxel/npc/knight/torso_upper.vox b/assets/voxygen/voxel/npc/knight/torso_upper.vox new file mode 100644 index 0000000000..e4ada8306d --- /dev/null +++ b/assets/voxygen/voxel/npc/knight/torso_upper.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07437596c5a7947da998b5bb53bc87ab4e3bfb4d9f94c1202bf60b8736b67c5c +size 6832 diff --git a/assets/voxygen/voxel/npc/marlin/marlin_fin_l.vox b/assets/voxygen/voxel/npc/marlin/fin_l.vox similarity index 100% rename from assets/voxygen/voxel/npc/marlin/marlin_fin_l.vox rename to assets/voxygen/voxel/npc/marlin/fin_l.vox diff --git a/assets/voxygen/voxel/npc/marlin/marlin_fin_r.vox b/assets/voxygen/voxel/npc/marlin/fin_r.vox similarity index 100% rename from assets/voxygen/voxel/npc/marlin/marlin_fin_r.vox rename to assets/voxygen/voxel/npc/marlin/fin_r.vox diff --git a/assets/voxygen/voxel/npc/marlin/marlin_head.vox b/assets/voxygen/voxel/npc/marlin/head.vox similarity index 100% rename from assets/voxygen/voxel/npc/marlin/marlin_head.vox rename to assets/voxygen/voxel/npc/marlin/head.vox diff --git a/assets/voxygen/voxel/npc/marlin/marlin_rear.vox b/assets/voxygen/voxel/npc/marlin/rear.vox similarity index 100% rename from assets/voxygen/voxel/npc/marlin/marlin_rear.vox rename to assets/voxygen/voxel/npc/marlin/rear.vox diff --git a/assets/voxygen/voxel/npc/marlin/marlin_tail.vox b/assets/voxygen/voxel/npc/marlin/tail.vox similarity index 100% rename from assets/voxygen/voxel/npc/marlin/marlin_tail.vox rename to assets/voxygen/voxel/npc/marlin/tail.vox diff --git a/assets/voxygen/voxel/npc/marlin/marlin_torso.vox b/assets/voxygen/voxel/npc/marlin/torso.vox similarity index 100% rename from assets/voxygen/voxel/npc/marlin/marlin_torso.vox rename to assets/voxygen/voxel/npc/marlin/torso.vox diff --git a/assets/voxygen/voxel/npc/pig_purple/pig_chest.vox b/assets/voxygen/voxel/npc/pig_purple/chest.vox similarity index 100% rename from assets/voxygen/voxel/npc/pig_purple/pig_chest.vox rename to assets/voxygen/voxel/npc/pig_purple/chest.vox diff --git a/assets/voxygen/voxel/npc/pig_purple/pig_head.vox b/assets/voxygen/voxel/npc/pig_purple/head.vox similarity index 100% rename from assets/voxygen/voxel/npc/pig_purple/pig_head.vox rename to assets/voxygen/voxel/npc/pig_purple/head.vox diff --git a/assets/voxygen/voxel/npc/pig_purple/pig_leg_l.vox b/assets/voxygen/voxel/npc/pig_purple/leg_l.vox similarity index 100% rename from assets/voxygen/voxel/npc/pig_purple/pig_leg_l.vox rename to assets/voxygen/voxel/npc/pig_purple/leg_l.vox diff --git a/assets/voxygen/voxel/npc/pig_purple/pig_leg_r.vox b/assets/voxygen/voxel/npc/pig_purple/leg_r.vox similarity index 100% rename from assets/voxygen/voxel/npc/pig_purple/pig_leg_r.vox rename to assets/voxygen/voxel/npc/pig_purple/leg_r.vox diff --git a/assets/voxygen/voxel/npc/wolf/wolf_ears.vox b/assets/voxygen/voxel/npc/wolf/ears.vox similarity index 100% rename from assets/voxygen/voxel/npc/wolf/wolf_ears.vox rename to assets/voxygen/voxel/npc/wolf/ears.vox diff --git a/assets/voxygen/voxel/npc/wolf/wolf_foot_lb.vox b/assets/voxygen/voxel/npc/wolf/foot_lb.vox similarity index 100% rename from assets/voxygen/voxel/npc/wolf/wolf_foot_lb.vox rename to assets/voxygen/voxel/npc/wolf/foot_lb.vox diff --git a/assets/voxygen/voxel/npc/wolf/wolf_foot_lf.vox b/assets/voxygen/voxel/npc/wolf/foot_lf.vox similarity index 100% rename from assets/voxygen/voxel/npc/wolf/wolf_foot_lf.vox rename to assets/voxygen/voxel/npc/wolf/foot_lf.vox diff --git a/assets/voxygen/voxel/npc/wolf/wolf_foot_rb.vox b/assets/voxygen/voxel/npc/wolf/foot_rb.vox similarity index 100% rename from assets/voxygen/voxel/npc/wolf/wolf_foot_rb.vox rename to assets/voxygen/voxel/npc/wolf/foot_rb.vox diff --git a/assets/voxygen/voxel/npc/wolf/wolf_foot_rf.vox b/assets/voxygen/voxel/npc/wolf/foot_rf.vox similarity index 100% rename from assets/voxygen/voxel/npc/wolf/wolf_foot_rf.vox rename to assets/voxygen/voxel/npc/wolf/foot_rf.vox diff --git a/assets/voxygen/voxel/npc/wolf/wolf_head_lower.vox b/assets/voxygen/voxel/npc/wolf/head_lower.vox similarity index 100% rename from assets/voxygen/voxel/npc/wolf/wolf_head_lower.vox rename to assets/voxygen/voxel/npc/wolf/head_lower.vox diff --git a/assets/voxygen/voxel/npc/wolf/wolf_head_upper.vox b/assets/voxygen/voxel/npc/wolf/head_upper.vox similarity index 100% rename from assets/voxygen/voxel/npc/wolf/wolf_head_upper.vox rename to assets/voxygen/voxel/npc/wolf/head_upper.vox diff --git a/assets/voxygen/voxel/npc/wolf/wolf_jaw.vox b/assets/voxygen/voxel/npc/wolf/jaw.vox similarity index 100% rename from assets/voxygen/voxel/npc/wolf/wolf_jaw.vox rename to assets/voxygen/voxel/npc/wolf/jaw.vox diff --git a/assets/voxygen/voxel/npc/wolf/wolf_tail.vox b/assets/voxygen/voxel/npc/wolf/tail.vox similarity index 100% rename from assets/voxygen/voxel/npc/wolf/wolf_tail.vox rename to assets/voxygen/voxel/npc/wolf/tail.vox diff --git a/assets/voxygen/voxel/npc/wolf/wolf_torso_back.vox b/assets/voxygen/voxel/npc/wolf/torso_back.vox similarity index 100% rename from assets/voxygen/voxel/npc/wolf/wolf_torso_back.vox rename to assets/voxygen/voxel/npc/wolf/torso_back.vox diff --git a/assets/voxygen/voxel/npc/wolf/wolf_torso_mid.vox b/assets/voxygen/voxel/npc/wolf/torso_mid.vox similarity index 100% rename from assets/voxygen/voxel/npc/wolf/wolf_torso_mid.vox rename to assets/voxygen/voxel/npc/wolf/torso_mid.vox diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs index c84d74d305..b2ba589b24 100644 --- a/common/src/comp/body.rs +++ b/common/src/comp/body.rs @@ -1,13 +1,13 @@ +pub mod biped_large; +pub mod bird_medium; +pub mod bird_small; +pub mod dragon; +pub mod fish_medium; +pub mod fish_small; pub mod humanoid; pub mod object; -pub mod quadruped; pub mod quadruped_medium; -pub mod bird_medium; -pub mod fish_medium; -pub mod dragon; -pub mod bird_small; -pub mod fish_small; -pub mod biped_large; +pub mod quadruped_small; use specs::{Component, FlaggedStorage}; use specs_idvs::IDVStorage; @@ -15,7 +15,7 @@ use specs_idvs::IDVStorage; #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum Body { Humanoid(humanoid::Body), - Quadruped(quadruped::Body), + QuadrupedSmall(quadruped_small::Body), QuadrupedMedium(quadruped_medium::Body), BirdMedium(bird_medium::Body), FishMedium(fish_medium::Body), diff --git a/common/src/comp/body/biped_large.rs b/common/src/comp/body/biped_large.rs index 41eab2caf7..9e9dc2a3cf 100644 --- a/common/src/comp/body/biped_large.rs +++ b/common/src/comp/body/biped_large.rs @@ -97,4 +97,4 @@ const ALL_FOOT_LS: [FootL; 1] = [FootL::Default]; pub enum FootR { Default, } -const ALL_FOOT_RS: [FootR; 1] = [FootR::Default]; \ No newline at end of file +const ALL_FOOT_RS: [FootR; 1] = [FootR::Default]; diff --git a/common/src/comp/body/bird_medium.rs b/common/src/comp/body/bird_medium.rs index 38a0cc438f..6968b2d2a5 100644 --- a/common/src/comp/body/bird_medium.rs +++ b/common/src/comp/body/bird_medium.rs @@ -65,4 +65,4 @@ const ALL_LEG_LS: [LegL; 1] = [LegL::Default]; pub enum LegR { Default, } -const ALL_LEG_RS: [LegR; 1] = [LegR::Default]; \ No newline at end of file +const ALL_LEG_RS: [LegR; 1] = [LegR::Default]; diff --git a/common/src/comp/body/bird_small.rs b/common/src/comp/body/bird_small.rs index eff28e3119..533613fe3a 100644 --- a/common/src/comp/body/bird_small.rs +++ b/common/src/comp/body/bird_small.rs @@ -31,7 +31,6 @@ pub enum Torso { } const ALL_TORSOS: [Torso; 1] = [Torso::Default]; - #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum WingL { Default, diff --git a/common/src/comp/body/dragon.rs b/common/src/comp/body/dragon.rs index d0b748d6fd..1b777d5aa4 100644 --- a/common/src/comp/body/dragon.rs +++ b/common/src/comp/body/dragon.rs @@ -15,9 +15,6 @@ pub struct Body { pub foot_fr: FootFR, pub foot_bl: FootBL, pub foot_br: FootBR, - - - } impl Body { pub fn random() -> Self { @@ -36,8 +33,6 @@ impl Body { foot_fr: *(&ALL_FOOT_FRS).choose(&mut rng).unwrap(), foot_bl: *(&ALL_FOOT_BLS).choose(&mut rng).unwrap(), foot_br: *(&ALL_FOOT_BRS).choose(&mut rng).unwrap(), - - } } } @@ -118,4 +113,4 @@ const ALL_FOOT_BLS: [FootBL; 1] = [FootBL::Default]; pub enum FootBR { Default, } -const ALL_FOOT_BRS: [FootBR; 1] = [FootBR::Default]; \ No newline at end of file +const ALL_FOOT_BRS: [FootBR; 1] = [FootBR::Default]; diff --git a/common/src/comp/body/fish_medium.rs b/common/src/comp/body/fish_medium.rs index 7da9bce91f..6d1c92a5f3 100644 --- a/common/src/comp/body/fish_medium.rs +++ b/common/src/comp/body/fish_medium.rs @@ -19,7 +19,6 @@ impl Body { tail: *(&ALL_TAILS).choose(&mut rng).unwrap(), fin_l: *(&ALL_FIN_LS).choose(&mut rng).unwrap(), fin_r: *(&ALL_FIN_RS).choose(&mut rng).unwrap(), - } } } diff --git a/common/src/comp/body/fish_small.rs b/common/src/comp/body/fish_small.rs index 0b5ba39ea7..6d0150de43 100644 --- a/common/src/comp/body/fish_small.rs +++ b/common/src/comp/body/fish_small.rs @@ -15,7 +15,6 @@ impl Body { } } - #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum Torso { Default, @@ -26,4 +25,4 @@ const ALL_TORSOS: [Torso; 1] = [Torso::Default]; pub enum Tail { Default, } -const ALL_TAILS: [Tail; 1] = [Tail::Default]; \ No newline at end of file +const ALL_TAILS: [Tail; 1] = [Tail::Default]; diff --git a/common/src/comp/body/quadruped.rs b/common/src/comp/body/quadruped_small.rs similarity index 100% rename from common/src/comp/body/quadruped.rs rename to common/src/comp/body/quadruped_small.rs diff --git a/common/src/comp/mod.rs b/common/src/comp/mod.rs index 572d5eb0e6..fa13636e02 100644 --- a/common/src/comp/mod.rs +++ b/common/src/comp/mod.rs @@ -16,7 +16,10 @@ mod visual; // Reexports pub use admin::Admin; pub use agent::Agent; -pub use body::{humanoid, object, quadruped, quadruped_medium, bird_medium, fish_medium, dragon, bird_small, fish_small, biped_large, Body}; +pub use body::{ + biped_large, bird_medium, bird_small, dragon, fish_medium, fish_small, humanoid, object, + quadruped_medium, quadruped_small, Body, +}; pub use character_state::{ActionState, CharacterState, MovementState}; pub use controller::{ ControlEvent, Controller, ControllerInputs, InventoryManip, MountState, Mounting, diff --git a/server/src/cmd.rs b/server/src/cmd.rs index 0b967a36db..7f8bf53b55 100644 --- a/server/src/cmd.rs +++ b/server/src/cmd.rs @@ -553,7 +553,7 @@ fn alignment_to_agent(alignment: &str, target: EcsEntity) -> Option fn kind_to_body(kind: NpcKind) -> comp::Body { match kind { NpcKind::Humanoid => comp::Body::Humanoid(comp::humanoid::Body::random()), - NpcKind::Pig => comp::Body::Quadruped(comp::quadruped::Body::random()), + NpcKind::Pig => comp::Body::QuadrupedSmall(comp::quadruped_small::Body::random()), NpcKind::Wolf => comp::Body::QuadrupedMedium(comp::quadruped_medium::Body::random()), } } diff --git a/voxygen/src/anim/biped_large/idle.rs b/voxygen/src/anim/biped_large/idle.rs index 09be0204ac..0fced4adc8 100644 --- a/voxygen/src/anim/biped_large/idle.rs +++ b/voxygen/src/anim/biped_large/idle.rs @@ -38,60 +38,48 @@ impl Animation for IdleAnimation { * 0.25, ); - next.knight_head.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_head.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_head.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_head.scale = Vec3::one() / 10.88; next.knight_upper_torso.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_upper_torso.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_upper_torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_upper_torso.scale = Vec3::one() / 10.88; next.knight_lower_torso.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_lower_torso.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_lower_torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_lower_torso.scale = Vec3::one() / 10.88; next.knight_shoulder_l.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_shoulder_l.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_shoulder_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_shoulder_l.scale = Vec3::one() / 10.88; next.knight_shoulder_r.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_shoulder_r.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_shoulder_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_shoulder_r.scale = Vec3::one() / 10.88; next.knight_hand_l.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_hand_l.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_hand_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_hand_l.scale = Vec3::one() / 10.88; next.knight_hand_r.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_hand_r.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_hand_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_hand_r.scale = Vec3::one() / 10.88; next.knight_leg_l.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_leg_l.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_leg_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_leg_l.scale = Vec3::one() / 10.88; next.knight_leg_r.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_leg_r.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_leg_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_leg_r.scale = Vec3::one() / 10.88; next.knight_foot_l.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_foot_l.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_foot_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_foot_l.scale = Vec3::one() / 10.88; next.knight_foot_r.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_foot_r.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_foot_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_foot_r.scale = Vec3::one() / 10.88; next } diff --git a/voxygen/src/anim/biped_large/jump.rs b/voxygen/src/anim/biped_large/jump.rs index 1745bad157..31e554cad8 100644 --- a/voxygen/src/anim/biped_large/jump.rs +++ b/voxygen/src/anim/biped_large/jump.rs @@ -25,61 +25,48 @@ impl Animation for JumpAnimation { let wave_slow = (anim_time as f32 * 3.5 + PI).sin(); let wave_slow_cos = (anim_time as f32 * 3.5 + PI).cos(); - - next.knight_head.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_head.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_head.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_head.scale = Vec3::one() / 10.88; next.knight_upper_torso.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_upper_torso.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_upper_torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_upper_torso.scale = Vec3::one() / 10.88; next.knight_lower_torso.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_lower_torso.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_lower_torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_lower_torso.scale = Vec3::one() / 10.88; next.knight_shoulder_l.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_shoulder_l.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_shoulder_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_shoulder_l.scale = Vec3::one() / 10.88; next.knight_shoulder_r.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_shoulder_r.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_shoulder_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_shoulder_r.scale = Vec3::one() / 10.88; next.knight_hand_l.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_hand_l.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_hand_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_hand_l.scale = Vec3::one() / 10.88; next.knight_hand_r.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_hand_r.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_hand_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_hand_r.scale = Vec3::one() / 10.88; next.knight_leg_l.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_leg_l.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_leg_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_leg_l.scale = Vec3::one() / 10.88; next.knight_leg_r.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_leg_r.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_leg_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_leg_r.scale = Vec3::one() / 10.88; next.knight_foot_l.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_foot_l.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_foot_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_foot_l.scale = Vec3::one() / 10.88; next.knight_foot_r.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_foot_r.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_foot_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_foot_r.scale = Vec3::one() / 10.88; next } diff --git a/voxygen/src/anim/biped_large/mod.rs b/voxygen/src/anim/biped_large/mod.rs index fc2c7c65f9..0843554a2f 100644 --- a/voxygen/src/anim/biped_large/mod.rs +++ b/voxygen/src/anim/biped_large/mod.rs @@ -23,9 +23,6 @@ pub struct BipedLargeSkeleton { knight_leg_r: Bone, knight_foot_l: Bone, knight_foot_r: Bone, - - - } impl BipedLargeSkeleton { @@ -42,7 +39,6 @@ impl BipedLargeSkeleton { knight_leg_r: Bone::default(), knight_foot_l: Bone::default(), knight_foot_r: Bone::default(), - } } } @@ -55,17 +51,18 @@ impl Skeleton for BipedLargeSkeleton { let leg_l_mat = self.knight_leg_l.compute_base_matrix(); let leg_r_mat = self.knight_leg_r.compute_base_matrix(); - [ FigureBoneData::new(self.knight_head.compute_base_matrix()), - FigureBoneData::new( - upper_torso_mat, - ), + FigureBoneData::new(upper_torso_mat), FigureBoneData::new(self.knight_lower_torso.compute_base_matrix() * upper_torso_mat), FigureBoneData::new(shoulder_l_mat * upper_torso_mat), FigureBoneData::new(shoulder_r_mat * upper_torso_mat), - FigureBoneData::new(self.knight_hand_l.compute_base_matrix() * shoulder_l_mat * upper_torso_mat), - FigureBoneData::new(self.knight_hand_r.compute_base_matrix() * shoulder_r_mat * upper_torso_mat), + FigureBoneData::new( + self.knight_hand_l.compute_base_matrix() * shoulder_l_mat * upper_torso_mat, + ), + FigureBoneData::new( + self.knight_hand_r.compute_base_matrix() * shoulder_r_mat * upper_torso_mat, + ), FigureBoneData::new(leg_l_mat), FigureBoneData::new(leg_r_mat), FigureBoneData::new(self.knight_foot_l.compute_base_matrix() * leg_l_mat), @@ -79,12 +76,13 @@ impl Skeleton for BipedLargeSkeleton { } fn interpolate(&mut self, target: &Self, dt: f32) { - self.knight_head - .interpolate(&target.knight_head, dt); - self.knight_upper_torso.interpolate(&target.knight_upper_torso, dt); + self.knight_head.interpolate(&target.knight_head, dt); + self.knight_upper_torso + .interpolate(&target.knight_upper_torso, dt); self.knight_lower_torso .interpolate(&target.knight_lower_torso, dt); - self.knight_shoulder_l.interpolate(&target.knight_shoulder_l, dt); + self.knight_shoulder_l + .interpolate(&target.knight_shoulder_l, dt); self.knight_shoulder_r .interpolate(&target.knight_shoulder_r, dt); self.knight_hand_l.interpolate(&target.knight_hand_l, dt); @@ -93,7 +91,5 @@ impl Skeleton for BipedLargeSkeleton { self.knight_leg_r.interpolate(&target.knight_leg_r, dt); self.knight_foot_l.interpolate(&target.knight_foot_l, dt); self.knight_foot_r.interpolate(&target.knight_foot_r, dt); - - } } diff --git a/voxygen/src/anim/biped_large/run.rs b/voxygen/src/anim/biped_large/run.rs index 3e92091d9a..17c532713a 100644 --- a/voxygen/src/anim/biped_large/run.rs +++ b/voxygen/src/anim/biped_large/run.rs @@ -38,60 +38,48 @@ impl Animation for RunAnimation { * 0.25, ); - next.knight_head.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_head.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_head.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_head.scale = Vec3::one() / 10.88; next.knight_upper_torso.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_upper_torso.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_upper_torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_upper_torso.scale = Vec3::one() / 10.88; next.knight_lower_torso.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_lower_torso.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_lower_torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_lower_torso.scale = Vec3::one() / 10.88; next.knight_shoulder_l.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_shoulder_l.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_shoulder_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_shoulder_l.scale = Vec3::one() / 10.88; next.knight_shoulder_r.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_shoulder_r.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_shoulder_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_shoulder_r.scale = Vec3::one() / 10.88; next.knight_hand_l.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_hand_l.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_hand_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_hand_l.scale = Vec3::one() / 10.88; next.knight_hand_r.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_hand_r.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_hand_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_hand_r.scale = Vec3::one() / 10.88; next.knight_leg_l.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_leg_l.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_leg_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_leg_l.scale = Vec3::one() / 10.88; next.knight_leg_r.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_leg_r.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_leg_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_leg_r.scale = Vec3::one() / 10.88; next.knight_foot_l.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_foot_l.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_foot_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_foot_l.scale = Vec3::one() / 10.88; next.knight_foot_r.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.knight_foot_r.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.knight_foot_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.knight_foot_r.scale = Vec3::one() / 10.88; next } diff --git a/voxygen/src/anim/birdmedium/idle.rs b/voxygen/src/anim/bird_medium/idle.rs similarity index 91% rename from voxygen/src/anim/birdmedium/idle.rs rename to voxygen/src/anim/bird_medium/idle.rs index b3770c6142..b8d57b912a 100644 --- a/voxygen/src/anim/birdmedium/idle.rs +++ b/voxygen/src/anim/bird_medium/idle.rs @@ -38,14 +38,12 @@ impl Animation for IdleAnimation { * 0.25, ); - next.duck_m_head.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; next.duck_m_head.ori = Quaternion::rotation_z(duck_m_look.x) * Quaternion::rotation_x(duck_m_look.y); next.duck_m_head.scale = Vec3::one() / 10.88; - next.duck_m_torso.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.duck_m_torso.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.duck_m_torso.ori = Quaternion::rotation_x(0.0); next.duck_m_torso.scale = Vec3::one() * 1.01; @@ -54,8 +52,7 @@ impl Animation for IdleAnimation { next.duck_m_tail.scale = Vec3::one() * 0.98; next.duck_m_wing_l.offset = Vec3::new(0.0, -13.0, 8.0) / 11.0; - next.duck_m_wing_l.ori = Quaternion::rotation_z(0.0) - * Quaternion::rotation_x(0.0); + next.duck_m_wing_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.duck_m_wing_l.scale = Vec3::one() / 11.0; next.duck_m_wing_r.offset = Vec3::new(0.0, -11.7, 11.0) / 11.0; diff --git a/voxygen/src/anim/birdmedium/jump.rs b/voxygen/src/anim/bird_medium/jump.rs similarity index 85% rename from voxygen/src/anim/birdmedium/jump.rs rename to voxygen/src/anim/bird_medium/jump.rs index 191412c2d5..5ceef62a59 100644 --- a/voxygen/src/anim/birdmedium/jump.rs +++ b/voxygen/src/anim/bird_medium/jump.rs @@ -25,15 +25,11 @@ impl Animation for JumpAnimation { let wave_slow = (anim_time as f32 * 3.5 + PI).sin(); let wave_slow_cos = (anim_time as f32 * 3.5 + PI).cos(); - - next.duck_m_head.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.duck_m_head.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.duck_m_head.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.duck_m_head.scale = Vec3::one() / 10.88; - next.duck_m_torso.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.duck_m_torso.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.duck_m_torso.ori = Quaternion::rotation_x(0.0); next.duck_m_torso.scale = Vec3::one() * 1.01; @@ -42,8 +38,7 @@ impl Animation for JumpAnimation { next.duck_m_tail.scale = Vec3::one() * 0.98; next.duck_m_wing_l.offset = Vec3::new(0.0, -13.0, 8.0) / 11.0; - next.duck_m_wing_l.ori = Quaternion::rotation_z(0.0) - * Quaternion::rotation_x(0.0); + next.duck_m_wing_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.duck_m_wing_l.scale = Vec3::one() / 11.0; next.duck_m_wing_r.offset = Vec3::new(0.0, -11.7, 11.0) / 11.0; @@ -59,4 +54,4 @@ impl Animation for JumpAnimation { next.duck_m_leg_r.scale = Vec3::one() * 1.00; next } -} \ No newline at end of file +} diff --git a/voxygen/src/anim/birdmedium/mod.rs b/voxygen/src/anim/bird_medium/mod.rs similarity index 87% rename from voxygen/src/anim/birdmedium/mod.rs rename to voxygen/src/anim/bird_medium/mod.rs index 53292603ba..3cbe7e0fc6 100644 --- a/voxygen/src/anim/birdmedium/mod.rs +++ b/voxygen/src/anim/bird_medium/mod.rs @@ -19,7 +19,6 @@ pub struct BirdMediumSkeleton { duck_m_wing_r: Bone, duck_m_leg_l: Bone, duck_m_leg_r: Bone, - } impl BirdMediumSkeleton { @@ -32,8 +31,6 @@ impl BirdMediumSkeleton { duck_m_wing_r: Bone::default(), duck_m_leg_l: Bone::default(), duck_m_leg_r: Bone::default(), - - } } } @@ -42,12 +39,9 @@ impl Skeleton for BirdMediumSkeleton { fn compute_matrices(&self) -> [FigureBoneData; 16] { let torso_mat = self.duck_m_torso.compute_base_matrix(); - [ FigureBoneData::new(self.duck_m_head.compute_base_matrix() * torso_mat), - FigureBoneData::new( - torso_mat, - ), + FigureBoneData::new(torso_mat), FigureBoneData::new(self.duck_m_tail.compute_base_matrix() * torso_mat), FigureBoneData::new(self.duck_m_wing_l.compute_base_matrix() * torso_mat), FigureBoneData::new(self.duck_m_wing_r.compute_base_matrix() * torso_mat), @@ -66,14 +60,11 @@ impl Skeleton for BirdMediumSkeleton { } fn interpolate(&mut self, target: &Self, dt: f32) { - self.duck_m_head - .interpolate(&target.duck_m_head, dt); + self.duck_m_head.interpolate(&target.duck_m_head, dt); self.duck_m_torso.interpolate(&target.duck_m_torso, dt); - self.duck_m_tail - .interpolate(&target.duck_m_tail, dt); + self.duck_m_tail.interpolate(&target.duck_m_tail, dt); self.duck_m_wing_l.interpolate(&target.duck_m_wing_l, dt); - self.duck_m_wing_r - .interpolate(&target.duck_m_wing_r, dt); + self.duck_m_wing_r.interpolate(&target.duck_m_wing_r, dt); self.duck_m_leg_l.interpolate(&target.duck_m_leg_l, dt); self.duck_m_leg_r.interpolate(&target.duck_m_leg_r, dt); } diff --git a/voxygen/src/anim/birdmedium/run.rs b/voxygen/src/anim/bird_medium/run.rs similarity index 87% rename from voxygen/src/anim/birdmedium/run.rs rename to voxygen/src/anim/bird_medium/run.rs index ac940f6ae7..e2609673bd 100644 --- a/voxygen/src/anim/birdmedium/run.rs +++ b/voxygen/src/anim/bird_medium/run.rs @@ -38,14 +38,11 @@ impl Animation for RunAnimation { * 0.25, ); - next.duck_m_head.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.duck_m_head.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.duck_m_head.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.duck_m_head.scale = Vec3::one() / 10.88; - next.duck_m_torso.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.duck_m_torso.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.duck_m_torso.ori = Quaternion::rotation_x(0.0); next.duck_m_torso.scale = Vec3::one() * 1.01; @@ -54,8 +51,7 @@ impl Animation for RunAnimation { next.duck_m_tail.scale = Vec3::one() * 0.98; next.duck_m_wing_l.offset = Vec3::new(0.0, -13.0, 8.0) / 11.0; - next.duck_m_wing_l.ori = Quaternion::rotation_z(0.0) - * Quaternion::rotation_x(0.0); + next.duck_m_wing_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.duck_m_wing_l.scale = Vec3::one() / 11.0; next.duck_m_wing_r.offset = Vec3::new(0.0, -11.7, 11.0) / 11.0; @@ -71,4 +67,4 @@ impl Animation for RunAnimation { next.duck_m_leg_r.scale = Vec3::one() * 1.00; next } -} \ No newline at end of file +} diff --git a/voxygen/src/anim/bird_small/idle.rs b/voxygen/src/anim/bird_small/idle.rs index 8b2fdd9e27..209a95bc1d 100644 --- a/voxygen/src/anim/bird_small/idle.rs +++ b/voxygen/src/anim/bird_small/idle.rs @@ -38,25 +38,20 @@ impl Animation for IdleAnimation { * 0.25, ); - next.crow_head.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.crow_head.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.crow_head.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.crow_head.scale = Vec3::one() / 10.88; next.crow_torso.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.crow_torso.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.crow_torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.crow_torso.scale = Vec3::one() / 10.88; next.crow_wing_l.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.crow_wing_l.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.crow_wing_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.crow_wing_l.scale = Vec3::one() / 10.88; next.crow_wing_r.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.crow_wing_r.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.crow_wing_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.crow_wing_r.scale = Vec3::one() / 10.88; next diff --git a/voxygen/src/anim/bird_small/jump.rs b/voxygen/src/anim/bird_small/jump.rs index f2d9eb928f..726ebc2987 100644 --- a/voxygen/src/anim/bird_small/jump.rs +++ b/voxygen/src/anim/bird_small/jump.rs @@ -25,26 +25,20 @@ impl Animation for JumpAnimation { let wave_slow = (anim_time as f32 * 3.5 + PI).sin(); let wave_slow_cos = (anim_time as f32 * 3.5 + PI).cos(); - - next.crow_head.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.crow_head.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.crow_head.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.crow_head.scale = Vec3::one() / 10.88; next.crow_torso.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.crow_torso.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.crow_torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.crow_torso.scale = Vec3::one() / 10.88; next.crow_wing_l.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.crow_wing_l.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.crow_wing_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.crow_wing_l.scale = Vec3::one() / 10.88; next.crow_wing_r.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.crow_wing_r.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.crow_wing_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.crow_wing_r.scale = Vec3::one() / 10.88; next diff --git a/voxygen/src/anim/bird_small/mod.rs b/voxygen/src/anim/bird_small/mod.rs index 472c861eea..6755f3a4f1 100644 --- a/voxygen/src/anim/bird_small/mod.rs +++ b/voxygen/src/anim/bird_small/mod.rs @@ -25,7 +25,6 @@ impl BirdSmallSkeleton { crow_torso: Bone::default(), crow_wing_l: Bone::default(), crow_wing_r: Bone::default(), - } } } @@ -34,12 +33,9 @@ impl Skeleton for BirdSmallSkeleton { fn compute_matrices(&self) -> [FigureBoneData; 16] { let torso_mat = self.crow_torso.compute_base_matrix(); - [ FigureBoneData::new(self.crow_head.compute_base_matrix() * torso_mat), - FigureBoneData::new( - torso_mat, - ), + FigureBoneData::new(torso_mat), FigureBoneData::new(self.crow_wing_l.compute_base_matrix() * torso_mat), FigureBoneData::new(self.crow_wing_r.compute_base_matrix() * torso_mat), FigureBoneData::default(), @@ -58,11 +54,9 @@ impl Skeleton for BirdSmallSkeleton { } fn interpolate(&mut self, target: &Self, dt: f32) { - self.crow_head - .interpolate(&target.crow_head, dt); + self.crow_head.interpolate(&target.crow_head, dt); self.crow_torso.interpolate(&target.crow_torso, dt); self.crow_wing_l.interpolate(&target.crow_wing_l, dt); - self.crow_wing_r - .interpolate(&target.crow_wing_r, dt); + self.crow_wing_r.interpolate(&target.crow_wing_r, dt); } } diff --git a/voxygen/src/anim/bird_small/run.rs b/voxygen/src/anim/bird_small/run.rs index 3a4fb0fc98..a11271c81d 100644 --- a/voxygen/src/anim/bird_small/run.rs +++ b/voxygen/src/anim/bird_small/run.rs @@ -38,25 +38,20 @@ impl Animation for RunAnimation { * 0.25, ); - next.crow_head.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.crow_head.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.crow_head.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.crow_head.scale = Vec3::one() / 10.88; next.crow_torso.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.crow_torso.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.crow_torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.crow_torso.scale = Vec3::one() / 10.88; next.crow_wing_l.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.crow_wing_l.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.crow_wing_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.crow_wing_l.scale = Vec3::one() / 10.88; next.crow_wing_r.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.crow_wing_r.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.crow_wing_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.crow_wing_r.scale = Vec3::one() / 10.88; next diff --git a/voxygen/src/anim/dragon/idle.rs b/voxygen/src/anim/dragon/idle.rs index 1d4df279a3..967f8baa9f 100644 --- a/voxygen/src/anim/dragon/idle.rs +++ b/voxygen/src/anim/dragon/idle.rs @@ -38,69 +38,55 @@ impl Animation for IdleAnimation { * 0.25, ); - next.dragon_head.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.dragon_head.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.dragon_head.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.dragon_head.scale = Vec3::one() / 10.88; - next.dragon_chest_front.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_chest_front.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_chest_front.ori = Quaternion::rotation_x(0.0); next.dragon_chest_front.scale = Vec3::one() * 1.01; - next.dragon_chest_rear.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_chest_rear.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_chest_rear.ori = Quaternion::rotation_x(0.0); next.dragon_chest_rear.scale = Vec3::one() * 1.01; - next.dragon_tail_front.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_tail_front.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_tail_front.ori = Quaternion::rotation_x(0.0); next.dragon_tail_front.scale = Vec3::one() * 1.01; - next.dragon_tail_rear.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_tail_rear.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_tail_rear.ori = Quaternion::rotation_x(0.0); next.dragon_tail_rear.scale = Vec3::one() * 1.01; - next.dragon_wing_in_l.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_wing_in_l.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_wing_in_l.ori = Quaternion::rotation_x(0.0); next.dragon_wing_in_l.scale = Vec3::one() * 1.01; - next.dragon_wing_in_r.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_wing_in_r.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_wing_in_r.ori = Quaternion::rotation_x(0.0); next.dragon_wing_in_r.scale = Vec3::one() * 1.01; - next.dragon_wing_out_l.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_wing_out_l.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_wing_out_l.ori = Quaternion::rotation_x(0.0); next.dragon_wing_out_l.scale = Vec3::one() * 1.01; - next.dragon_wing_out_r.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_wing_out_r.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_wing_out_r.ori = Quaternion::rotation_x(0.0); next.dragon_wing_out_r.scale = Vec3::one() * 1.01; - next.dragon_foot_fl.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_foot_fl.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_foot_fl.ori = Quaternion::rotation_x(0.0); next.dragon_foot_fl.scale = Vec3::one() * 1.01; - next.dragon_foot_fr.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_foot_fr.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_foot_fr.ori = Quaternion::rotation_x(0.0); next.dragon_foot_fr.scale = Vec3::one() * 1.01; - next.dragon_foot_bl.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_foot_bl.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_foot_bl.ori = Quaternion::rotation_x(0.0); next.dragon_foot_bl.scale = Vec3::one() * 1.01; - next.dragon_foot_br.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_foot_br.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_foot_br.ori = Quaternion::rotation_x(0.0); next.dragon_foot_br.scale = Vec3::one() * 1.01; next diff --git a/voxygen/src/anim/dragon/jump.rs b/voxygen/src/anim/dragon/jump.rs index 6b94bd54cd..daccdcfa79 100644 --- a/voxygen/src/anim/dragon/jump.rs +++ b/voxygen/src/anim/dragon/jump.rs @@ -25,70 +25,55 @@ impl Animation for JumpAnimation { let wave_slow = (anim_time as f32 * 3.5 + PI).sin(); let wave_slow_cos = (anim_time as f32 * 3.5 + PI).cos(); - - next.dragon_head.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.dragon_head.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.dragon_head.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.dragon_head.scale = Vec3::one() / 10.88; - next.dragon_chest_front.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_chest_front.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_chest_front.ori = Quaternion::rotation_x(0.0); next.dragon_chest_front.scale = Vec3::one() * 1.01; - next.dragon_chest_rear.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_chest_rear.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_chest_rear.ori = Quaternion::rotation_x(0.0); next.dragon_chest_rear.scale = Vec3::one() * 1.01; - next.dragon_tail_front.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_tail_front.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_tail_front.ori = Quaternion::rotation_x(0.0); next.dragon_tail_front.scale = Vec3::one() * 1.01; - next.dragon_tail_rear.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_tail_rear.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_tail_rear.ori = Quaternion::rotation_x(0.0); next.dragon_tail_rear.scale = Vec3::one() * 1.01; - next.dragon_wing_in_l.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_wing_in_l.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_wing_in_l.ori = Quaternion::rotation_x(0.0); next.dragon_wing_in_l.scale = Vec3::one() * 1.01; - next.dragon_wing_in_r.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_wing_in_r.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_wing_in_r.ori = Quaternion::rotation_x(0.0); next.dragon_wing_in_r.scale = Vec3::one() * 1.01; - next.dragon_wing_out_l.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_wing_out_l.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_wing_out_l.ori = Quaternion::rotation_x(0.0); next.dragon_wing_out_l.scale = Vec3::one() * 1.01; - next.dragon_wing_out_r.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_wing_out_r.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_wing_out_r.ori = Quaternion::rotation_x(0.0); next.dragon_wing_out_r.scale = Vec3::one() * 1.01; - next.dragon_foot_fl.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_foot_fl.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_foot_fl.ori = Quaternion::rotation_x(0.0); next.dragon_foot_fl.scale = Vec3::one() * 1.01; - next.dragon_foot_fr.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_foot_fr.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_foot_fr.ori = Quaternion::rotation_x(0.0); next.dragon_foot_fr.scale = Vec3::one() * 1.01; - next.dragon_foot_bl.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_foot_bl.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_foot_bl.ori = Quaternion::rotation_x(0.0); next.dragon_foot_bl.scale = Vec3::one() * 1.01; - next.dragon_foot_br.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_foot_br.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_foot_br.ori = Quaternion::rotation_x(0.0); next.dragon_foot_br.scale = Vec3::one() * 1.01; next diff --git a/voxygen/src/anim/dragon/mod.rs b/voxygen/src/anim/dragon/mod.rs index 139cfd6bec..5a39eeffe5 100644 --- a/voxygen/src/anim/dragon/mod.rs +++ b/voxygen/src/anim/dragon/mod.rs @@ -25,27 +25,24 @@ pub struct DragonSkeleton { dragon_foot_fr: Bone, dragon_foot_bl: Bone, dragon_foot_br: Bone, - } impl DragonSkeleton { pub fn new() -> Self { Self { - dragon_head: Bone::default(), - dragon_chest_front: Bone::default(), - dragon_chest_rear: Bone::default(), - dragon_tail_front: Bone::default(), - dragon_tail_rear: Bone::default(), - dragon_wing_in_l: Bone::default(), - dragon_wing_in_r: Bone::default(), - dragon_wing_out_l: Bone::default(), - dragon_wing_out_r: Bone::default(), - dragon_foot_fl: Bone::default(), - dragon_foot_fr: Bone::default(), - dragon_foot_bl: Bone::default(), - dragon_foot_br: Bone::default(), - - + dragon_head: Bone::default(), + dragon_chest_front: Bone::default(), + dragon_chest_rear: Bone::default(), + dragon_tail_front: Bone::default(), + dragon_tail_rear: Bone::default(), + dragon_wing_in_l: Bone::default(), + dragon_wing_in_r: Bone::default(), + dragon_wing_out_l: Bone::default(), + dragon_wing_out_r: Bone::default(), + dragon_foot_fl: Bone::default(), + dragon_foot_fr: Bone::default(), + dragon_foot_bl: Bone::default(), + dragon_foot_br: Bone::default(), } } } @@ -57,12 +54,9 @@ impl Skeleton for DragonSkeleton { let wing_in_r_mat = self.dragon_wing_in_r.compute_base_matrix(); let tail_front_mat = self.dragon_tail_front.compute_base_matrix(); - [ FigureBoneData::new(self.dragon_head.compute_base_matrix() * chest_front_mat), - FigureBoneData::new( - chest_front_mat, - ), + FigureBoneData::new(chest_front_mat), FigureBoneData::new(self.dragon_chest_rear.compute_base_matrix() * chest_front_mat), FigureBoneData::new(tail_front_mat), FigureBoneData::new(self.dragon_tail_rear.compute_base_matrix() * tail_front_mat), @@ -82,19 +76,25 @@ impl Skeleton for DragonSkeleton { fn interpolate(&mut self, target: &Self, dt: f32) { self.dragon_head.interpolate(&target.dragon_head, dt); - self.dragon_chest_front.interpolate(&target.dragon_chest_front, dt); - self.dragon_chest_rear.interpolate(&target.dragon_chest_rear, dt); - self.dragon_tail_front.interpolate(&target.dragon_tail_front, dt); - self.dragon_tail_rear.interpolate(&target.dragon_tail_rear, dt); - self.dragon_wing_in_l.interpolate(&target.dragon_wing_in_l, dt); - self.dragon_wing_in_r.interpolate(&target.dragon_wing_in_r, dt); - self.dragon_wing_out_l.interpolate(&target.dragon_wing_out_l, dt); - self.dragon_wing_out_r.interpolate(&target.dragon_wing_out_r, dt); + self.dragon_chest_front + .interpolate(&target.dragon_chest_front, dt); + self.dragon_chest_rear + .interpolate(&target.dragon_chest_rear, dt); + self.dragon_tail_front + .interpolate(&target.dragon_tail_front, dt); + self.dragon_tail_rear + .interpolate(&target.dragon_tail_rear, dt); + self.dragon_wing_in_l + .interpolate(&target.dragon_wing_in_l, dt); + self.dragon_wing_in_r + .interpolate(&target.dragon_wing_in_r, dt); + self.dragon_wing_out_l + .interpolate(&target.dragon_wing_out_l, dt); + self.dragon_wing_out_r + .interpolate(&target.dragon_wing_out_r, dt); self.dragon_foot_fl.interpolate(&target.dragon_foot_fl, dt); self.dragon_foot_fr.interpolate(&target.dragon_foot_fr, dt); self.dragon_foot_bl.interpolate(&target.dragon_foot_bl, dt); self.dragon_foot_br.interpolate(&target.dragon_foot_br, dt); - - } } diff --git a/voxygen/src/anim/dragon/run.rs b/voxygen/src/anim/dragon/run.rs index 9c053fb3a7..d3da869934 100644 --- a/voxygen/src/anim/dragon/run.rs +++ b/voxygen/src/anim/dragon/run.rs @@ -38,69 +38,55 @@ impl Animation for RunAnimation { * 0.25, ); - next.dragon_head.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.dragon_head.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.dragon_head.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.dragon_head.scale = Vec3::one() / 10.88; - next.dragon_chest_front.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_chest_front.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_chest_front.ori = Quaternion::rotation_x(0.0); next.dragon_chest_front.scale = Vec3::one() * 1.01; - next.dragon_chest_rear.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_chest_rear.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_chest_rear.ori = Quaternion::rotation_x(0.0); next.dragon_chest_rear.scale = Vec3::one() * 1.01; - next.dragon_tail_front.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_tail_front.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_tail_front.ori = Quaternion::rotation_x(0.0); next.dragon_tail_front.scale = Vec3::one() * 1.01; - next.dragon_tail_rear.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_tail_rear.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_tail_rear.ori = Quaternion::rotation_x(0.0); next.dragon_tail_rear.scale = Vec3::one() * 1.01; - next.dragon_wing_in_l.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_wing_in_l.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_wing_in_l.ori = Quaternion::rotation_x(0.0); next.dragon_wing_in_l.scale = Vec3::one() * 1.01; - next.dragon_wing_in_r.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_wing_in_r.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_wing_in_r.ori = Quaternion::rotation_x(0.0); next.dragon_wing_in_r.scale = Vec3::one() * 1.01; - next.dragon_wing_out_l.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_wing_out_l.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_wing_out_l.ori = Quaternion::rotation_x(0.0); next.dragon_wing_out_l.scale = Vec3::one() * 1.01; - next.dragon_wing_out_r.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_wing_out_r.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_wing_out_r.ori = Quaternion::rotation_x(0.0); next.dragon_wing_out_r.scale = Vec3::one() * 1.01; - next.dragon_foot_fl.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_foot_fl.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_foot_fl.ori = Quaternion::rotation_x(0.0); next.dragon_foot_fl.scale = Vec3::one() * 1.01; - next.dragon_foot_fr.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_foot_fr.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_foot_fr.ori = Quaternion::rotation_x(0.0); next.dragon_foot_fr.scale = Vec3::one() * 1.01; - next.dragon_foot_bl.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_foot_bl.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_foot_bl.ori = Quaternion::rotation_x(0.0); next.dragon_foot_bl.scale = Vec3::one() * 1.01; - next.dragon_foot_br.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.dragon_foot_br.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.dragon_foot_br.ori = Quaternion::rotation_x(0.0); next.dragon_foot_br.scale = Vec3::one() * 1.01; next diff --git a/voxygen/src/anim/fishmedium/idle.rs b/voxygen/src/anim/fish_medium/idle.rs similarity index 91% rename from voxygen/src/anim/fishmedium/idle.rs rename to voxygen/src/anim/fish_medium/idle.rs index 2b04526f34..a960d839e2 100644 --- a/voxygen/src/anim/fishmedium/idle.rs +++ b/voxygen/src/anim/fish_medium/idle.rs @@ -38,14 +38,12 @@ impl Animation for IdleAnimation { * 0.25, ); - next.marlin_head.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; next.marlin_head.ori = Quaternion::rotation_z(duck_m_look.x) * Quaternion::rotation_x(duck_m_look.y); next.marlin_head.scale = Vec3::one() / 10.88; - next.marlin_torso.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.marlin_torso.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.marlin_torso.ori = Quaternion::rotation_x(0.0); next.marlin_torso.scale = Vec3::one() * 1.01; @@ -54,8 +52,7 @@ impl Animation for IdleAnimation { next.marlin_rear.scale = Vec3::one() * 0.98; next.marlin_tail.offset = Vec3::new(0.0, -13.0, 8.0) / 11.0; - next.marlin_tail.ori = Quaternion::rotation_z(0.0) - * Quaternion::rotation_x(0.0); + next.marlin_tail.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.marlin_tail.scale = Vec3::one() / 11.0; next.marlin_fin_l.offset = Vec3::new(0.0, -11.7, 11.0) / 11.0; diff --git a/voxygen/src/anim/fishmedium/jump.rs b/voxygen/src/anim/fish_medium/jump.rs similarity index 84% rename from voxygen/src/anim/fishmedium/jump.rs rename to voxygen/src/anim/fish_medium/jump.rs index cb817e502b..fe91b5b29a 100644 --- a/voxygen/src/anim/fishmedium/jump.rs +++ b/voxygen/src/anim/fish_medium/jump.rs @@ -25,15 +25,11 @@ impl Animation for JumpAnimation { let wave_slow = (anim_time as f32 * 3.5 + PI).sin(); let wave_slow_cos = (anim_time as f32 * 3.5 + PI).cos(); - - next.marlin_head.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.marlin_head.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.marlin_head.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.marlin_head.scale = Vec3::one() / 10.88; - next.marlin_torso.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.marlin_torso.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.marlin_torso.ori = Quaternion::rotation_x(0.0); next.marlin_torso.scale = Vec3::one() * 1.01; @@ -42,8 +38,7 @@ impl Animation for JumpAnimation { next.marlin_rear.scale = Vec3::one() * 0.98; next.marlin_tail.offset = Vec3::new(0.0, -13.0, 8.0) / 11.0; - next.marlin_tail.ori = Quaternion::rotation_z(0.0) - * Quaternion::rotation_x(0.0); + next.marlin_tail.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.marlin_tail.scale = Vec3::one() / 11.0; next.marlin_fin_l.offset = Vec3::new(0.0, -11.7, 11.0) / 11.0; diff --git a/voxygen/src/anim/fishmedium/mod.rs b/voxygen/src/anim/fish_medium/mod.rs similarity index 86% rename from voxygen/src/anim/fishmedium/mod.rs rename to voxygen/src/anim/fish_medium/mod.rs index 6689dbea3a..3b7b93fd5d 100644 --- a/voxygen/src/anim/fishmedium/mod.rs +++ b/voxygen/src/anim/fish_medium/mod.rs @@ -18,7 +18,6 @@ pub struct FishMediumSkeleton { marlin_tail: Bone, marlin_fin_l: Bone, marlin_fin_r: Bone, - } impl FishMediumSkeleton { @@ -30,7 +29,6 @@ impl FishMediumSkeleton { marlin_tail: Bone::default(), marlin_fin_l: Bone::default(), marlin_fin_r: Bone::default(), - } } } @@ -40,12 +38,9 @@ impl Skeleton for FishMediumSkeleton { let torso_mat = self.marlin_torso.compute_base_matrix(); let rear_mat = self.marlin_rear.compute_base_matrix(); - [ FigureBoneData::new(self.marlin_head.compute_base_matrix() * torso_mat), - FigureBoneData::new( - torso_mat, - ), + FigureBoneData::new(torso_mat), FigureBoneData::new(rear_mat * torso_mat), FigureBoneData::new(self.marlin_tail.compute_base_matrix() * rear_mat), FigureBoneData::new(self.marlin_fin_l.compute_base_matrix() * rear_mat), @@ -64,14 +59,11 @@ impl Skeleton for FishMediumSkeleton { } fn interpolate(&mut self, target: &Self, dt: f32) { - self.marlin_head - .interpolate(&target.marlin_head, dt); + self.marlin_head.interpolate(&target.marlin_head, dt); self.marlin_torso.interpolate(&target.marlin_torso, dt); - self.marlin_rear - .interpolate(&target.marlin_rear, dt); + self.marlin_rear.interpolate(&target.marlin_rear, dt); self.marlin_tail.interpolate(&target.marlin_tail, dt); - self.marlin_fin_l - .interpolate(&target.marlin_fin_l, dt); + self.marlin_fin_l.interpolate(&target.marlin_fin_l, dt); self.marlin_fin_r.interpolate(&target.marlin_fin_r, dt); } } diff --git a/voxygen/src/anim/fishmedium/run.rs b/voxygen/src/anim/fish_medium/run.rs similarity index 83% rename from voxygen/src/anim/fishmedium/run.rs rename to voxygen/src/anim/fish_medium/run.rs index 0f1e92743f..5c97c3c4d7 100644 --- a/voxygen/src/anim/fishmedium/run.rs +++ b/voxygen/src/anim/fish_medium/run.rs @@ -2,7 +2,7 @@ use super::{ super::{Animation, SkeletonAttr}, FishMediumSkeleton, }; -use std::{f32::consts::PI}; +use std::f32::consts::PI; use vek::*; pub struct RunAnimation; @@ -25,15 +25,11 @@ impl Animation for RunAnimation { let wave_slow = (anim_time as f32 * 3.5 + PI).sin(); let wave_slow_cos = (anim_time as f32 * 3.5 + PI).cos(); - - next.marlin_head.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.marlin_head.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.marlin_head.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.marlin_head.scale = Vec3::one() / 10.88; - next.marlin_torso.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.marlin_torso.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.marlin_torso.ori = Quaternion::rotation_x(0.0); next.marlin_torso.scale = Vec3::one() * 1.01; @@ -42,8 +38,7 @@ impl Animation for RunAnimation { next.marlin_rear.scale = Vec3::one() * 0.98; next.marlin_tail.offset = Vec3::new(0.0, -13.0, 8.0) / 11.0; - next.marlin_tail.ori = Quaternion::rotation_z(0.0) - * Quaternion::rotation_x(0.0); + next.marlin_tail.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.marlin_tail.scale = Vec3::one() / 11.0; next.marlin_fin_l.offset = Vec3::new(0.0, -11.7, 11.0) / 11.0; diff --git a/voxygen/src/anim/fish_small/idle.rs b/voxygen/src/anim/fish_small/idle.rs index 1ca41f58ae..797a7f3416 100644 --- a/voxygen/src/anim/fish_small/idle.rs +++ b/voxygen/src/anim/fish_small/idle.rs @@ -38,14 +38,11 @@ impl Animation for IdleAnimation { * 0.25, ); - next.cardinalfish_torso.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.cardinalfish_torso.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.cardinalfish_torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.cardinalfish_torso.scale = Vec3::one() / 10.88; - next.cardinalfish_tail.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.cardinalfish_tail.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.cardinalfish_tail.ori = Quaternion::rotation_x(0.0); next.cardinalfish_tail.scale = Vec3::one() * 1.01; diff --git a/voxygen/src/anim/fish_small/jump.rs b/voxygen/src/anim/fish_small/jump.rs index d48dccec67..844ea0408d 100644 --- a/voxygen/src/anim/fish_small/jump.rs +++ b/voxygen/src/anim/fish_small/jump.rs @@ -25,15 +25,11 @@ impl Animation for JumpAnimation { let wave_slow = (anim_time as f32 * 3.5 + PI).sin(); let wave_slow_cos = (anim_time as f32 * 3.5 + PI).cos(); - - next.cardinalfish_torso.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.cardinalfish_torso.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.cardinalfish_torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.cardinalfish_torso.scale = Vec3::one() / 10.88; - next.cardinalfish_tail.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.cardinalfish_tail.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.cardinalfish_tail.ori = Quaternion::rotation_x(0.0); next.cardinalfish_tail.scale = Vec3::one() * 1.01; diff --git a/voxygen/src/anim/fish_small/mod.rs b/voxygen/src/anim/fish_small/mod.rs index 00b25e90ea..1164594bda 100644 --- a/voxygen/src/anim/fish_small/mod.rs +++ b/voxygen/src/anim/fish_small/mod.rs @@ -14,7 +14,6 @@ use crate::render::FigureBoneData; pub struct FishSmallSkeleton { cardinalfish_torso: Bone, cardinalfish_tail: Bone, - } impl FishSmallSkeleton { @@ -30,7 +29,6 @@ impl Skeleton for FishSmallSkeleton { fn compute_matrices(&self) -> [FigureBoneData; 16] { let torso_mat = self.cardinalfish_torso.compute_base_matrix(); - [ FigureBoneData::new(torso_mat), FigureBoneData::new(self.cardinalfish_tail.compute_base_matrix() * torso_mat), @@ -54,6 +52,7 @@ impl Skeleton for FishSmallSkeleton { fn interpolate(&mut self, target: &Self, dt: f32) { self.cardinalfish_torso .interpolate(&target.cardinalfish_torso, dt); - self.cardinalfish_tail.interpolate(&target.cardinalfish_tail, dt); + self.cardinalfish_tail + .interpolate(&target.cardinalfish_tail, dt); } } diff --git a/voxygen/src/anim/fish_small/run.rs b/voxygen/src/anim/fish_small/run.rs index 2a278a1624..d11bf2a895 100644 --- a/voxygen/src/anim/fish_small/run.rs +++ b/voxygen/src/anim/fish_small/run.rs @@ -38,14 +38,11 @@ impl Animation for RunAnimation { * 0.25, ); - next.cardinalfish_torso.offset = Vec3::new(0.0, 7.5, 15.0) / 11.0; - next.cardinalfish_torso.ori = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.cardinalfish_torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); next.cardinalfish_torso.scale = Vec3::one() / 10.88; - next.cardinalfish_tail.offset = - Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); + next.cardinalfish_tail.offset = Vec3::new(0.0, 4.5 - wave_ultra_slow_cos * 0.12, 2.0); next.cardinalfish_tail.ori = Quaternion::rotation_x(0.0); next.cardinalfish_tail.scale = Vec3::one() * 1.01; diff --git a/voxygen/src/anim/mod.rs b/voxygen/src/anim/mod.rs index bc1adc74f9..a65eb04a6d 100644 --- a/voxygen/src/anim/mod.rs +++ b/voxygen/src/anim/mod.rs @@ -1,14 +1,14 @@ +pub mod biped_large; +pub mod bird_medium; +pub mod bird_small; pub mod character; +pub mod dragon; +pub mod fish_medium; +pub mod fish_small; pub mod fixture; pub mod object; -pub mod quadruped; -pub mod quadrupedmedium; -pub mod birdmedium; -pub mod fishmedium; -pub mod dragon; -pub mod bird_small; -pub mod fish_small; -pub mod biped_large; +pub mod quadruped_medium; +pub mod quadruped_small; use crate::render::FigureBoneData; use common::comp::{self, item::Tool}; diff --git a/voxygen/src/anim/quadrupedmedium/idle.rs b/voxygen/src/anim/quadruped_medium/idle.rs similarity index 100% rename from voxygen/src/anim/quadrupedmedium/idle.rs rename to voxygen/src/anim/quadruped_medium/idle.rs diff --git a/voxygen/src/anim/quadrupedmedium/jump.rs b/voxygen/src/anim/quadruped_medium/jump.rs similarity index 100% rename from voxygen/src/anim/quadrupedmedium/jump.rs rename to voxygen/src/anim/quadruped_medium/jump.rs diff --git a/voxygen/src/anim/quadrupedmedium/mod.rs b/voxygen/src/anim/quadruped_medium/mod.rs similarity index 100% rename from voxygen/src/anim/quadrupedmedium/mod.rs rename to voxygen/src/anim/quadruped_medium/mod.rs diff --git a/voxygen/src/anim/quadrupedmedium/run.rs b/voxygen/src/anim/quadruped_medium/run.rs similarity index 100% rename from voxygen/src/anim/quadrupedmedium/run.rs rename to voxygen/src/anim/quadruped_medium/run.rs diff --git a/voxygen/src/anim/quadruped/idle.rs b/voxygen/src/anim/quadruped_small/idle.rs similarity index 96% rename from voxygen/src/anim/quadruped/idle.rs rename to voxygen/src/anim/quadruped_small/idle.rs index fc0f912acc..96f8754855 100644 --- a/voxygen/src/anim/quadruped/idle.rs +++ b/voxygen/src/anim/quadruped_small/idle.rs @@ -1,6 +1,6 @@ use super::{ super::{Animation, SkeletonAttr}, - QuadrupedSkeleton, + QuadrupedSmallSkeleton, }; use std::{f32::consts::PI, ops::Mul}; use vek::*; @@ -8,7 +8,7 @@ use vek::*; pub struct IdleAnimation; impl Animation for IdleAnimation { - type Skeleton = QuadrupedSkeleton; + type Skeleton = QuadrupedSmallSkeleton; type Dependency = (f64); fn update_skeleton( diff --git a/voxygen/src/anim/quadruped/jump.rs b/voxygen/src/anim/quadruped_small/jump.rs similarity index 96% rename from voxygen/src/anim/quadruped/jump.rs rename to voxygen/src/anim/quadruped_small/jump.rs index d0cf3fbe39..62e287ef0e 100644 --- a/voxygen/src/anim/quadruped/jump.rs +++ b/voxygen/src/anim/quadruped_small/jump.rs @@ -1,6 +1,6 @@ use super::{ super::{Animation, SkeletonAttr}, - QuadrupedSkeleton, + QuadrupedSmallSkeleton, }; use std::f32::consts::PI; use vek::*; @@ -8,7 +8,7 @@ use vek::*; pub struct JumpAnimation; impl Animation for JumpAnimation { - type Skeleton = QuadrupedSkeleton; + type Skeleton = QuadrupedSmallSkeleton; type Dependency = (f32, f64); fn update_skeleton( diff --git a/voxygen/src/anim/quadruped/mod.rs b/voxygen/src/anim/quadruped_small/mod.rs similarity index 94% rename from voxygen/src/anim/quadruped/mod.rs rename to voxygen/src/anim/quadruped_small/mod.rs index 662c641b38..5f3c7e64b3 100644 --- a/voxygen/src/anim/quadruped/mod.rs +++ b/voxygen/src/anim/quadruped_small/mod.rs @@ -11,7 +11,7 @@ use super::{Bone, Skeleton}; use crate::render::FigureBoneData; #[derive(Clone)] -pub struct QuadrupedSkeleton { +pub struct QuadrupedSmallSkeleton { pig_head: Bone, pig_chest: Bone, pig_leg_lf: Bone, @@ -20,7 +20,7 @@ pub struct QuadrupedSkeleton { pig_leg_rb: Bone, } -impl QuadrupedSkeleton { +impl QuadrupedSmallSkeleton { pub fn new() -> Self { Self { pig_head: Bone::default(), @@ -33,7 +33,7 @@ impl QuadrupedSkeleton { } } -impl Skeleton for QuadrupedSkeleton { +impl Skeleton for QuadrupedSmallSkeleton { fn compute_matrices(&self) -> [FigureBoneData; 16] { [ FigureBoneData::new(self.pig_head.compute_base_matrix()), diff --git a/voxygen/src/anim/quadruped/run.rs b/voxygen/src/anim/quadruped_small/run.rs similarity index 96% rename from voxygen/src/anim/quadruped/run.rs rename to voxygen/src/anim/quadruped_small/run.rs index f43863a063..a6f9b877a7 100644 --- a/voxygen/src/anim/quadruped/run.rs +++ b/voxygen/src/anim/quadruped_small/run.rs @@ -1,13 +1,13 @@ use super::{ super::{Animation, SkeletonAttr}, - QuadrupedSkeleton, + QuadrupedSmallSkeleton, }; use vek::*; pub struct RunAnimation; impl Animation for RunAnimation { - type Skeleton = QuadrupedSkeleton; + type Skeleton = QuadrupedSmallSkeleton; type Dependency = (f32, f64); fn update_skeleton( diff --git a/voxygen/src/scene/figure/cache.rs b/voxygen/src/scene/figure/cache.rs index b8fd3ba31b..eb3874c159 100644 --- a/voxygen/src/scene/figure/cache.rs +++ b/voxygen/src/scene/figure/cache.rs @@ -190,13 +190,13 @@ impl FigureModelCache { None, None, ], - Body::Quadruped(body) => [ - Some(mesh_pig_head(body.head)), - Some(mesh_pig_chest(body.chest)), - Some(mesh_pig_leg_lf(body.leg_l)), - Some(mesh_pig_leg_rf(body.leg_r)), - Some(mesh_pig_leg_lb(body.leg_l)), - Some(mesh_pig_leg_rb(body.leg_r)), + Body::QuadrupedSmall(body) => [ + Some(mesh_quadruped_small_head(body.head)), + Some(mesh_quadruped_small_chest(body.chest)), + Some(mesh_quadruped_small_leg_lf(body.leg_l)), + Some(mesh_quadruped_small_leg_rf(body.leg_r)), + Some(mesh_quadruped_small_leg_lb(body.leg_l)), + Some(mesh_quadruped_small_leg_rb(body.leg_r)), None, None, None, @@ -209,17 +209,17 @@ impl FigureModelCache { None, ], Body::QuadrupedMedium(body) => [ - Some(mesh_wolf_head_upper(body.head_upper)), - Some(mesh_wolf_jaw(body.jaw)), - Some(mesh_wolf_head_lower(body.head_lower)), - Some(mesh_wolf_tail(body.tail)), - Some(mesh_wolf_torso_back(body.torso_back)), - Some(mesh_wolf_torso_mid(body.torso_mid)), - Some(mesh_wolf_ears(body.ears)), - Some(mesh_wolf_foot_lf(body.foot_lf)), - Some(mesh_wolf_foot_rf(body.foot_rf)), - Some(mesh_wolf_foot_lb(body.foot_lb)), - Some(mesh_wolf_foot_rb(body.foot_rb)), + Some(mesh_quadruped_medium_head_upper(body.head_upper)), + Some(mesh_quadruped_medium_jaw(body.jaw)), + Some(mesh_quadruped_medium_head_lower(body.head_lower)), + Some(mesh_quadruped_medium_tail(body.tail)), + Some(mesh_quadruped_medium_torso_back(body.torso_back)), + Some(mesh_quadruped_medium_torso_mid(body.torso_mid)), + Some(mesh_quadruped_medium_ears(body.ears)), + Some(mesh_quadruped_medium_foot_lf(body.foot_lf)), + Some(mesh_quadruped_medium_foot_rf(body.foot_rf)), + Some(mesh_quadruped_medium_foot_lb(body.foot_lb)), + Some(mesh_quadruped_medium_foot_rb(body.foot_rb)), None, None, None, @@ -227,13 +227,13 @@ impl FigureModelCache { None, ], Body::BirdMedium(body) => [ - Some(mesh_duck_m_head(body.head)), - Some(mesh_duck_m_torso(body.torso)), - Some(mesh_duck_m_tail(body.tail)), - Some(mesh_duck_m_wing_l(body.wing_l)), - Some(mesh_duck_m_wing_r(body.wing_r)), - Some(mesh_duck_m_leg_l(body.leg_l)), - Some(mesh_duck_m_leg_r(body.leg_r)), + Some(mesh_bird_medium_head(body.head)), + Some(mesh_bird_medium_torso(body.torso)), + Some(mesh_bird_medium_tail(body.tail)), + Some(mesh_bird_medium_wing_l(body.wing_l)), + Some(mesh_bird_medium_wing_r(body.wing_r)), + Some(mesh_bird_medium_leg_l(body.leg_l)), + Some(mesh_bird_medium_leg_r(body.leg_r)), None, None, None, @@ -245,12 +245,12 @@ impl FigureModelCache { None, ], Body::FishMedium(body) => [ - Some(mesh_marlin_head(body.head)), - Some(mesh_marlin_torso(body.torso)), - Some(mesh_marlin_rear(body.rear)), - Some(mesh_marlin_tail(body.tail)), - Some(mesh_marlin_fin_l(body.fin_l)), - Some(mesh_marlin_fin_r(body.fin_r)), + Some(mesh_fish_medium_head(body.head)), + Some(mesh_fish_medium_torso(body.torso)), + Some(mesh_fish_medium_rear(body.rear)), + Some(mesh_fish_medium_tail(body.tail)), + Some(mesh_fish_medium_fin_l(body.fin_l)), + Some(mesh_fish_medium_fin_r(body.fin_r)), None, None, None, @@ -281,10 +281,10 @@ impl FigureModelCache { None, ], Body::BirdSmall(body) => [ - Some(mesh_crow_head(body.head)), - Some(mesh_crow_torso(body.torso)), - Some(mesh_crow_wing_l(body.wing_l)), - Some(mesh_crow_wing_r(body.wing_r)), + Some(mesh_bird_small_head(body.head)), + Some(mesh_bird_small_torso(body.torso)), + Some(mesh_bird_small_wing_l(body.wing_l)), + Some(mesh_bird_small_wing_r(body.wing_r)), None, None, None, @@ -299,8 +299,8 @@ impl FigureModelCache { None, ], Body::FishSmall(body) => [ - Some(mesh_cardinalfish_torso(body.torso)), - Some(mesh_cardinalfish_tail(body.tail)), + Some(mesh_fish_small_torso(body.torso)), + Some(mesh_fish_small_tail(body.tail)), None, None, None, @@ -317,17 +317,17 @@ impl FigureModelCache { None, ], Body::BipedLarge(body) => [ - Some(mesh_knight_head(body.head)), - Some(mesh_knight_upper_torso(body.upper_torso)), - Some(mesh_knight_lower_torso(body.lower_torso)), - Some(mesh_knight_shoulder_l(body.shoulder_l)), - Some(mesh_knight_shoulder_r(body.shoulder_r)), - Some(mesh_knight_hand_l(body.hand_l)), - Some(mesh_knight_hand_r(body.hand_r)), - Some(mesh_knight_leg_l(body.leg_l)), - Some(mesh_knight_leg_r(body.leg_r)), - Some(mesh_knight_foot_l(body.foot_l)), - Some(mesh_knight_foot_r(body.foot_r)), + Some(mesh_biped_large_head(body.head)), + Some(mesh_biped_large_upper_torso(body.upper_torso)), + Some(mesh_biped_large_lower_torso(body.lower_torso)), + Some(mesh_biped_large_shoulder_l(body.shoulder_l)), + Some(mesh_biped_large_shoulder_r(body.shoulder_r)), + Some(mesh_biped_large_hand_l(body.hand_l)), + Some(mesh_biped_large_hand_r(body.hand_r)), + Some(mesh_biped_large_leg_l(body.leg_l)), + Some(mesh_biped_large_leg_r(body.leg_r)), + Some(mesh_biped_large_foot_l(body.foot_l)), + Some(mesh_biped_large_foot_r(body.foot_r)), None, None, None, diff --git a/voxygen/src/scene/figure/load.rs b/voxygen/src/scene/figure/load.rs index 7de261c8f9..967c1314f5 100644 --- a/voxygen/src/scene/figure/load.rs +++ b/voxygen/src/scene/figure/load.rs @@ -6,12 +6,14 @@ use common::comp::humanoid::Body; use common::{ assets::{self, watch::ReloadIndicator, Asset}, comp::{ + biped_large, bird_medium, bird_small, dragon, fish_medium, fish_small, humanoid::{ Belt, BodyType, Chest, EyeColor, Eyebrows, Foot, Hand, Pants, Race, Shoulder, Skin, }, item::Tool, - object, quadruped, quadruped_medium, bird_medium, fish_medium, dragon, bird_small, fish_small, biped_large, Item, Itemkind + object, quadruped_small, quadruped_medium, bird_medium, fish_medium, dragon, bird_small, fish_small, biped_large, Item, Itemkind + }, figure::{DynaUnionizer, MatSegment, Material, Segment}, @@ -547,271 +549,279 @@ pub fn mesh_draw() -> Mesh { //} ///////// -pub fn mesh_pig_head(head: quadruped::Head) -> Mesh { +pub fn mesh_quadruped_small_head(head: quadruped_small::Head) -> Mesh { load_mesh( match head { - quadruped::Head::Default => "npc.pig_purple.pig_head", + quadruped_small::Head::Default => "npc.pig_purple.head", }, Vec3::new(-6.0, 4.5, 3.0), ) } -pub fn mesh_pig_chest(chest: quadruped::Chest) -> Mesh { +pub fn mesh_quadruped_small_chest(chest: quadruped_small::Chest) -> Mesh { load_mesh( match chest { - quadruped::Chest::Default => "npc.pig_purple.pig_chest", + quadruped_small::Chest::Default => "npc.pig_purple.chest", }, Vec3::new(-5.0, 4.5, 0.0), ) } -pub fn mesh_pig_leg_lf(leg_l: quadruped::LegL) -> Mesh { +pub fn mesh_quadruped_small_leg_lf(leg_l: quadruped_small::LegL) -> Mesh { load_mesh( match leg_l { - quadruped::LegL::Default => "npc.pig_purple.pig_leg_l", + quadruped_small::LegL::Default => "npc.pig_purple.leg_l", }, Vec3::new(0.0, -1.0, -1.5), ) } -pub fn mesh_pig_leg_rf(leg_r: quadruped::LegR) -> Mesh { +pub fn mesh_quadruped_small_leg_rf(leg_r: quadruped_small::LegR) -> Mesh { load_mesh( match leg_r { - quadruped::LegR::Default => "npc.pig_purple.pig_leg_r", + quadruped_small::LegR::Default => "npc.pig_purple.leg_r", }, Vec3::new(0.0, -1.0, -1.5), ) } -pub fn mesh_pig_leg_lb(leg_l: quadruped::LegL) -> Mesh { +pub fn mesh_quadruped_small_leg_lb(leg_l: quadruped_small::LegL) -> Mesh { load_mesh( match leg_l { - quadruped::LegL::Default => "npc.pig_purple.pig_leg_l", + quadruped_small::LegL::Default => "npc.pig_purple.leg_l", }, Vec3::new(0.0, -1.0, -1.5), ) } -pub fn mesh_pig_leg_rb(leg_r: quadruped::LegR) -> Mesh { +pub fn mesh_quadruped_small_leg_rb(leg_r: quadruped_small::LegR) -> Mesh { load_mesh( match leg_r { - quadruped::LegR::Default => "npc.pig_purple.pig_leg_r", + quadruped_small::LegR::Default => "npc.pig_purple.leg_r", }, Vec3::new(0.0, -1.0, -1.5), ) } ////// -pub fn mesh_wolf_head_upper(upper_head: quadruped_medium::HeadUpper) -> Mesh { +pub fn mesh_quadruped_medium_head_upper( + upper_head: quadruped_medium::HeadUpper, +) -> Mesh { load_mesh( match upper_head { - quadruped_medium::HeadUpper::Default => "npc.wolf.wolf_head_upper", + quadruped_medium::HeadUpper::Default => "npc.wolf.head_upper", }, Vec3::new(-7.0, -6.0, -5.5), ) } -pub fn mesh_wolf_jaw(jaw: quadruped_medium::Jaw) -> Mesh { +pub fn mesh_quadruped_medium_jaw(jaw: quadruped_medium::Jaw) -> Mesh { load_mesh( match jaw { - quadruped_medium::Jaw::Default => "npc.wolf.wolf_jaw", + quadruped_medium::Jaw::Default => "npc.wolf.jaw", }, Vec3::new(-3.0, -3.0, -2.5), ) } -pub fn mesh_wolf_head_lower(head_lower: quadruped_medium::HeadLower) -> Mesh { +pub fn mesh_quadruped_medium_head_lower( + head_lower: quadruped_medium::HeadLower, +) -> Mesh { load_mesh( match head_lower { - quadruped_medium::HeadLower::Default => "npc.wolf.wolf_head_lower", + quadruped_medium::HeadLower::Default => "npc.wolf.head_lower", }, Vec3::new(-7.0, -6.0, -5.5), ) } -pub fn mesh_wolf_tail(tail: quadruped_medium::Tail) -> Mesh { +pub fn mesh_quadruped_medium_tail(tail: quadruped_medium::Tail) -> Mesh { load_mesh( match tail { - quadruped_medium::Tail::Default => "npc.wolf.wolf_tail", + quadruped_medium::Tail::Default => "npc.wolf.tail", }, Vec3::new(-2.0, -12.0, -5.0), ) } -pub fn mesh_wolf_torso_back(torso_back: quadruped_medium::TorsoBack) -> Mesh { +pub fn mesh_quadruped_medium_torso_back( + torso_back: quadruped_medium::TorsoBack, +) -> Mesh { load_mesh( match torso_back { - quadruped_medium::TorsoBack::Default => "npc.wolf.wolf_torso_back", + quadruped_medium::TorsoBack::Default => "npc.wolf.torso_back", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_wolf_torso_mid(torso_mid: quadruped_medium::TorsoMid) -> Mesh { +pub fn mesh_quadruped_medium_torso_mid( + torso_mid: quadruped_medium::TorsoMid, +) -> Mesh { load_mesh( match torso_mid { - quadruped_medium::TorsoMid::Default => "npc.wolf.wolf_torso_mid", + quadruped_medium::TorsoMid::Default => "npc.wolf.torso_mid", }, Vec3::new(-8.0, -5.5, -6.0), ) } -pub fn mesh_wolf_ears(ears: quadruped_medium::Ears) -> Mesh { +pub fn mesh_quadruped_medium_ears(ears: quadruped_medium::Ears) -> Mesh { load_mesh( match ears { - quadruped_medium::Ears::Default => "npc.wolf.wolf_ears", + quadruped_medium::Ears::Default => "npc.wolf.ears", }, Vec3::new(-4.0, -1.0, -1.0), ) } -pub fn mesh_wolf_foot_lf(foot_lf: quadruped_medium::FootLF) -> Mesh { +pub fn mesh_quadruped_medium_foot_lf(foot_lf: quadruped_medium::FootLF) -> Mesh { load_mesh( match foot_lf { - quadruped_medium::FootLF::Default => "npc.wolf.wolf_foot_lf", + quadruped_medium::FootLF::Default => "npc.wolf.foot_lf", }, Vec3::new(-2.5, -4.0, -2.5), ) } -pub fn mesh_wolf_foot_rf(foot_rf: quadruped_medium::FootRF) -> Mesh { +pub fn mesh_quadruped_medium_foot_rf(foot_rf: quadruped_medium::FootRF) -> Mesh { load_mesh( match foot_rf { - quadruped_medium::FootRF::Default => "npc.wolf.wolf_foot_rf", + quadruped_medium::FootRF::Default => "npc.wolf.foot_rf", }, Vec3::new(-2.5, -4.0, -2.5), ) } -pub fn mesh_wolf_foot_lb(foot_lb: quadruped_medium::FootLB) -> Mesh { +pub fn mesh_quadruped_medium_foot_lb(foot_lb: quadruped_medium::FootLB) -> Mesh { load_mesh( match foot_lb { - quadruped_medium::FootLB::Default => "npc.wolf.wolf_foot_lb", + quadruped_medium::FootLB::Default => "npc.wolf.foot_lb", }, Vec3::new(-2.5, -4.0, -2.5), ) } -pub fn mesh_wolf_foot_rb(foot_rb: quadruped_medium::FootRB) -> Mesh { +pub fn mesh_quadruped_medium_foot_rb(foot_rb: quadruped_medium::FootRB) -> Mesh { load_mesh( match foot_rb { - quadruped_medium::FootRB::Default => "npc.wolf.wolf_foot_rb", + quadruped_medium::FootRB::Default => "npc.wolf.foot_rb", }, Vec3::new(-2.5, -4.0, -2.5), ) } //// -pub fn mesh_duck_m_head(head: bird_medium::Head) -> Mesh { +pub fn mesh_bird_medium_head(head: bird_medium::Head) -> Mesh { load_mesh( match head { - bird_medium::Head::Default => "npc.duck_m.duck_m_head", + bird_medium::Head::Default => "npc.duck_m.head", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_duck_m_torso(torso: bird_medium::Torso) -> Mesh { +pub fn mesh_bird_medium_torso(torso: bird_medium::Torso) -> Mesh { load_mesh( match torso { - bird_medium::Torso::Default => "npc.duck_m.duck_m_body", + bird_medium::Torso::Default => "npc.duck_m.body", }, Vec3::new(-8.0, -5.5, -6.0), ) } -pub fn mesh_duck_m_tail(tail: bird_medium::Tail) -> Mesh { +pub fn mesh_bird_medium_tail(tail: bird_medium::Tail) -> Mesh { load_mesh( match tail { - bird_medium::Tail::Default => "npc.duck_m.duck_m_tail", + bird_medium::Tail::Default => "npc.duck_m.tail", }, Vec3::new(-4.0, -1.0, -1.0), ) } -pub fn mesh_duck_m_wing_l(wing_l: bird_medium::WingL) -> Mesh { +pub fn mesh_bird_medium_wing_l(wing_l: bird_medium::WingL) -> Mesh { load_mesh( match wing_l { - bird_medium::WingL::Default => "npc.duck_m.duck_m_wing", + bird_medium::WingL::Default => "npc.duck_m.wing", }, Vec3::new(-2.5, -4.0, -2.5), ) } -pub fn mesh_duck_m_wing_r(wing_r: bird_medium::WingR) -> Mesh { +pub fn mesh_bird_medium_wing_r(wing_r: bird_medium::WingR) -> Mesh { load_mesh( match wing_r { - bird_medium::WingR::Default => "npc.duck_m.duck_m_wing", + bird_medium::WingR::Default => "npc.duck_m.wing", }, Vec3::new(-2.5, -4.0, -2.5), ) } -pub fn mesh_duck_m_leg_l(leg_l: bird_medium::LegL) -> Mesh { +pub fn mesh_bird_medium_leg_l(leg_l: bird_medium::LegL) -> Mesh { load_mesh( match leg_l { - bird_medium::LegL::Default => "npc.duck_m.duck_m_leg_l", + bird_medium::LegL::Default => "npc.duck_m.leg_l", }, Vec3::new(-2.5, -4.0, -2.5), ) } -pub fn mesh_duck_m_leg_r(leg_r: bird_medium::LegR) -> Mesh { +pub fn mesh_bird_medium_leg_r(leg_r: bird_medium::LegR) -> Mesh { load_mesh( match leg_r { - bird_medium::LegR::Default => "npc.duck_m.duck_m_leg_r", + bird_medium::LegR::Default => "npc.duck_m.leg_r", }, Vec3::new(-2.5, -4.0, -2.5), ) } //// -pub fn mesh_marlin_head(head: fish_medium::Head) -> Mesh { +pub fn mesh_fish_medium_head(head: fish_medium::Head) -> Mesh { load_mesh( match head { - fish_medium::Head::Default => "npc.marlin.marlin_head", + fish_medium::Head::Default => "npc.marlin.head", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_marlin_torso(torso: fish_medium::Torso) -> Mesh { +pub fn mesh_fish_medium_torso(torso: fish_medium::Torso) -> Mesh { load_mesh( match torso { - fish_medium::Torso::Default => "npc.marlin.marlin_torso", + fish_medium::Torso::Default => "npc.marlin.torso", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_marlin_rear(rear: fish_medium::Rear) -> Mesh { +pub fn mesh_fish_medium_rear(rear: fish_medium::Rear) -> Mesh { load_mesh( match rear { - fish_medium::Rear::Default => "npc.marlin.marlin_rear", + fish_medium::Rear::Default => "npc.marlin.rear", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_marlin_tail(tail: fish_medium::Tail) -> Mesh { +pub fn mesh_fish_medium_tail(tail: fish_medium::Tail) -> Mesh { load_mesh( match tail { - fish_medium::Tail::Default => "npc.marlin.marlin_tail", + fish_medium::Tail::Default => "npc.marlin.tail", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_marlin_fin_l(fin_l: fish_medium::FinL) -> Mesh { +pub fn mesh_fish_medium_fin_l(fin_l: fish_medium::FinL) -> Mesh { load_mesh( match fin_l { - fish_medium::FinL::Default => "npc.marlin.marlin_fin_l", + fish_medium::FinL::Default => "npc.marlin.fin_l", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_marlin_fin_r(fin_r: fish_medium::FinR) -> Mesh { +pub fn mesh_fish_medium_fin_r(fin_r: fish_medium::FinR) -> Mesh { load_mesh( match fin_r { - fish_medium::FinR::Default => "npc.marlin.marlin_fin_r", + fish_medium::FinR::Default => "npc.marlin.fin_r", }, Vec3::new(-7.0, -6.0, -6.0), ) @@ -820,7 +830,7 @@ pub fn mesh_marlin_fin_r(fin_r: fish_medium::FinR) -> Mesh { pub fn mesh_dragon_head(head: dragon::Head) -> Mesh { load_mesh( match head { - dragon::Head::Default => "npc.dragon.dragon_head", + dragon::Head::Default => "npc.dragon.head", }, Vec3::new(-7.0, -6.0, -6.0), ) @@ -829,7 +839,7 @@ pub fn mesh_dragon_head(head: dragon::Head) -> Mesh { pub fn mesh_dragon_chest_front(chest_front: dragon::ChestFront) -> Mesh { load_mesh( match chest_front { - dragon::ChestFront::Default => "npc.dragon.dragon_chest_front", + dragon::ChestFront::Default => "npc.dragon.chest_front", }, Vec3::new(-7.0, -6.0, -6.0), ) @@ -838,7 +848,7 @@ pub fn mesh_dragon_chest_front(chest_front: dragon::ChestFront) -> Mesh Mesh { load_mesh( match chest_rear { - dragon::ChestRear::Default => "npc.dragon.dragon_chest_rear", + dragon::ChestRear::Default => "npc.dragon.chest_rear", }, Vec3::new(-7.0, -6.0, -6.0), ) @@ -847,7 +857,7 @@ pub fn mesh_dragon_chest_rear(chest_rear: dragon::ChestRear) -> Mesh Mesh { load_mesh( match tail_front { - dragon::TailFront::Default => "npc.dragon.dragon_tail_front", + dragon::TailFront::Default => "npc.dragon.tail_front", }, Vec3::new(-7.0, -6.0, -6.0), ) @@ -856,7 +866,7 @@ pub fn mesh_dragon_tail_front(tail_front: dragon::TailFront) -> Mesh Mesh { load_mesh( match tail_rear { - dragon::TailRear::Default => "npc.dragon.dragon_tail_rear", + dragon::TailRear::Default => "npc.dragon.tail_rear", }, Vec3::new(-7.0, -6.0, -6.0), ) @@ -865,7 +875,7 @@ pub fn mesh_dragon_tail_rear(tail_rear: dragon::TailRear) -> Mesh Mesh { load_mesh( match wing_in_l { - dragon::WingInL::Default => "npc.dragon.dragon_wing_in_l", + dragon::WingInL::Default => "npc.dragon.wing_in_l", }, Vec3::new(-7.0, -6.0, -6.0), ) @@ -874,7 +884,7 @@ pub fn mesh_dragon_wing_in_l(wing_in_l: dragon::WingInL) -> Mesh pub fn mesh_dragon_wing_in_r(wing_in_r: dragon::WingInR) -> Mesh { load_mesh( match wing_in_r { - dragon::WingInR::Default => "npc.dragon.dragon_wing_in_r", + dragon::WingInR::Default => "npc.dragon.wing_in_r", }, Vec3::new(-7.0, -6.0, -6.0), ) @@ -883,7 +893,7 @@ pub fn mesh_dragon_wing_in_r(wing_in_r: dragon::WingInR) -> Mesh pub fn mesh_dragon_wing_out_l(wing_out_l: dragon::WingOutL) -> Mesh { load_mesh( match wing_out_l { - dragon::WingOutL::Default => "npc.dragon.dragon_wing_out_l", + dragon::WingOutL::Default => "npc.dragon.wing_out_l", }, Vec3::new(-7.0, -6.0, -6.0), ) @@ -892,7 +902,7 @@ pub fn mesh_dragon_wing_out_l(wing_out_l: dragon::WingOutL) -> Mesh Mesh { load_mesh( match wing_out_r { - dragon::WingOutR::Default => "npc.dragon.dragon_wing_out_r", + dragon::WingOutR::Default => "npc.dragon.wing_out_r", }, Vec3::new(-7.0, -6.0, -6.0), ) @@ -901,7 +911,7 @@ pub fn mesh_dragon_wing_out_r(wing_out_r: dragon::WingOutR) -> Mesh Mesh { load_mesh( match foot_fl { - dragon::FootFL::Default => "npc.dragon.dragon_foot_fl", + dragon::FootFL::Default => "npc.dragon.foot_fl", }, Vec3::new(-7.0, -6.0, -6.0), ) @@ -910,7 +920,7 @@ pub fn mesh_dragon_foot_fl(foot_fl: dragon::FootFL) -> Mesh { pub fn mesh_dragon_foot_fr(foot_fr: dragon::FootFR) -> Mesh { load_mesh( match foot_fr { - dragon::FootFR::Default => "npc.dragon.dragon_foot_fr", + dragon::FootFR::Default => "npc.dragon.foot_fr", }, Vec3::new(-7.0, -6.0, -6.0), ) @@ -919,7 +929,7 @@ pub fn mesh_dragon_foot_fr(foot_fr: dragon::FootFR) -> Mesh { pub fn mesh_dragon_foot_bl(foot_bl: dragon::FootBL) -> Mesh { load_mesh( match foot_bl { - dragon::FootBL::Default => "npc.dragon.dragon_foot_bl", + dragon::FootBL::Default => "npc.dragon.foot_bl", }, Vec3::new(-7.0, -6.0, -6.0), ) @@ -928,167 +938,166 @@ pub fn mesh_dragon_foot_bl(foot_bl: dragon::FootBL) -> Mesh { pub fn mesh_dragon_foot_br(foot_br: dragon::FootBR) -> Mesh { load_mesh( match foot_br { - dragon::FootBR::Default => "npc.dragon.dragon_foot_br", + dragon::FootBR::Default => "npc.dragon.foot_br", }, Vec3::new(-7.0, -6.0, -6.0), ) } //// -pub fn mesh_crow_head(head: bird_small::Head) -> Mesh { +pub fn mesh_bird_small_head(head: bird_small::Head) -> Mesh { load_mesh( match head { - bird_small::Head::Default => "npc.crow.crow_head", + bird_small::Head::Default => "npc.crow.head", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_crow_torso(torso: bird_small::Torso) -> Mesh { +pub fn mesh_bird_small_torso(torso: bird_small::Torso) -> Mesh { load_mesh( match torso { - bird_small::Torso::Default => "npc.crow.crow_torso", + bird_small::Torso::Default => "npc.crow.torso", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_crow_wing_l(wing_l: bird_small::WingL) -> Mesh { +pub fn mesh_bird_small_wing_l(wing_l: bird_small::WingL) -> Mesh { load_mesh( match wing_l { - bird_small::WingL::Default => "npc.crow.crow_wing_l", + bird_small::WingL::Default => "npc.crow.wing_l", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_crow_wing_r(wing_r: bird_small::WingR) -> Mesh { +pub fn mesh_bird_small_wing_r(wing_r: bird_small::WingR) -> Mesh { load_mesh( match wing_r { - bird_small::WingR::Default => "npc.crow.crow_wing_r", + bird_small::WingR::Default => "npc.crow.wing_r", }, Vec3::new(-7.0, -6.0, -6.0), ) } //// -pub fn mesh_cardinalfish_torso(torso: fish_small::Torso) -> Mesh { +pub fn mesh_fish_small_torso(torso: fish_small::Torso) -> Mesh { load_mesh( match torso { - fish_small::Torso::Default => "npc.cardinalfish.cardinalfish_torso", + fish_small::Torso::Default => "npc.cardinalfish.torso", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_cardinalfish_tail(tail: fish_small::Tail) -> Mesh { +pub fn mesh_fish_small_tail(tail: fish_small::Tail) -> Mesh { load_mesh( match tail { - fish_small::Tail::Default => "npc.cardinalfish.cardinalfish_tail", + fish_small::Tail::Default => "npc.cardinalfish.tail", }, Vec3::new(-7.0, -6.0, -6.0), ) } //// -pub fn mesh_knight_head(head: biped_large::Head) -> Mesh { +pub fn mesh_biped_large_head(head: biped_large::Head) -> Mesh { load_mesh( match head { - biped_large::Head::Default => "npc.knight.knight_", + biped_large::Head::Default => "npc.knight.head", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_knight_upper_torso(upper_torso: biped_large::UpperTorso) -> Mesh { +pub fn mesh_biped_large_upper_torso(upper_torso: biped_large::UpperTorso) -> Mesh { load_mesh( match upper_torso { - biped_large::UpperTorso::Default => "npc.knight.knight_upper_torso", + biped_large::UpperTorso::Default => "npc.knight.upper_torso", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_knight_lower_torso(lower_torso: biped_large::LowerTorso) -> Mesh { +pub fn mesh_biped_large_lower_torso(lower_torso: biped_large::LowerTorso) -> Mesh { load_mesh( match lower_torso { - biped_large::LowerTorso::Default => "npc.knight.knight_lower_torso", + biped_large::LowerTorso::Default => "npc.knight.lower_torso", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_knight_shoulder_l(shoulder_l: biped_large::ShoulderL) -> Mesh { +pub fn mesh_biped_large_shoulder_l(shoulder_l: biped_large::ShoulderL) -> Mesh { load_mesh( match shoulder_l { - biped_large::ShoulderL::Default => "npc.knight.knight_shoulder_l", + biped_large::ShoulderL::Default => "npc.knight.shoulder_l", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_knight_shoulder_r(shoulder_r: biped_large::ShoulderR) -> Mesh { +pub fn mesh_biped_large_shoulder_r(shoulder_r: biped_large::ShoulderR) -> Mesh { load_mesh( match shoulder_r { - biped_large::ShoulderR::Default => "npc.knight.knight_shoulder_r", + biped_large::ShoulderR::Default => "npc.knight.shoulder_r", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_knight_hand_l(hand_l: biped_large::HandL) -> Mesh { +pub fn mesh_biped_large_hand_l(hand_l: biped_large::HandL) -> Mesh { load_mesh( match hand_l { - biped_large::HandL::Default => "npc.knight.knight_hand_l", + biped_large::HandL::Default => "npc.knight.hand_l", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_knight_hand_r(hand_r: biped_large::HandR) -> Mesh { +pub fn mesh_biped_large_hand_r(hand_r: biped_large::HandR) -> Mesh { load_mesh( match hand_r { - biped_large::HandR::Default => "npc.knight.knight_hand_r", + biped_large::HandR::Default => "npc.knight.hand_r", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_knight_leg_l(leg_l: biped_large::LegL) -> Mesh { +pub fn mesh_biped_large_leg_l(leg_l: biped_large::LegL) -> Mesh { load_mesh( match leg_l { - biped_large::LegL::Default => "npc.knight.knight_leg_l", + biped_large::LegL::Default => "npc.knight.leg_l", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_knight_leg_r(leg_r: biped_large::LegR) -> Mesh { +pub fn mesh_biped_large_leg_r(leg_r: biped_large::LegR) -> Mesh { load_mesh( match leg_r { - biped_large::LegR::Default => "npc.knight.knight_leg_r", + biped_large::LegR::Default => "npc.knight.leg_r", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_knight_foot_l(foot_l: biped_large::FootL) -> Mesh { +pub fn mesh_biped_large_foot_l(foot_l: biped_large::FootL) -> Mesh { load_mesh( match foot_l { - biped_large::FootL::Default => "npc.knight.knight_foot_l", + biped_large::FootL::Default => "npc.knight.foot_l", }, Vec3::new(-7.0, -6.0, -6.0), ) } -pub fn mesh_knight_foot_r(foot_r: biped_large::FootR) -> Mesh { +pub fn mesh_biped_large_foot_r(foot_r: biped_large::FootR) -> Mesh { load_mesh( match foot_r { - biped_large::FootR::Default => "npc.knight.knight_foot_r", + biped_large::FootR::Default => "npc.knight.foot_r", }, Vec3::new(-7.0, -6.0, -6.0), ) } - //// pub fn mesh_object(obj: object::Body) -> Mesh { use object::Body; diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index 254a1c93f6..664d6ab937 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -8,10 +8,6 @@ use crate::{ anim::{ self, character::CharacterSkeleton, object::ObjectSkeleton, quadruped::QuadrupedSkeleton, quadrupedmedium::QuadrupedMediumSkeleton, birdmedium::BirdMediumSkeleton, fishmedium::FishMediumSkeleton, dragon::DragonSkeleton, bird_small::BirdSmallSkeleton, fish_small::FishSmallSkeleton, biped_large::BipedLargeSkeleton, Animation, Skeleton, -<<<<<<< HEAD - -======= ->>>>>>> added large bipeds, small birbs, small fish skeletons }, render::{Consts, FigureBoneData, FigureLocals, Globals, Light, Renderer, Shadow}, scene::camera::{Camera, CameraMode},