From 57d5e90dddf4816c3d6f9cae677307999483f5a2 Mon Sep 17 00:00:00 2001 From: jshipsey Date: Sat, 13 Feb 2021 01:06:43 -0500 Subject: [PATCH] full bipedsmall armor swaps --- .../adlet/chest}/adlet_bow.ron | 0 .../adlet/chest}/adlet_spear.ron | 0 .../adlet/foot}/adlet.ron | 0 .../adlet/hand}/adlet_bow.ron | 0 .../adlet/hand}/adlet_spear.ron | 0 .../biped_small/adlet/head/adlet_bow.ron | 12 + .../biped_small/adlet/head/adlet_spear.ron | 12 + .../adlet/pants}/adlet_bow.ron | 0 .../adlet/pants}/adlet_spear.ron | 0 .../biped_small/adlet/tail/adlet.ron | 12 + .../gnarling/chest}/gnarling.ron | 0 .../gnarling/foot}/gnarling.ron | 0 .../gnarling/hand}/gnarling.ron | 0 .../biped_small/gnarling/head/gnarling.ron | 12 + .../gnarling/pants}/gnarling.ron | 0 .../biped_small/gnarling/tail/gnarling.ron | 12 + .../haniwa/chest}/haniwa.ron | 0 .../haniwa/foot}/haniwa.ron | 0 .../haniwa/hand}/haniwa.ron | 0 .../biped_small/haniwa/head/haniwa.ron | 12 + .../haniwa/pants}/haniwa.ron | 0 .../kappa/chest}/kappa.ron | 0 .../kappa/foot}/kappa.ron | 0 .../kappa/hand}/kappa.ron | 0 .../biped_small/kappa/head/kappa.ron | 12 + .../kappa/pants}/kappa.ron | 0 .../biped_small/kappa/tail/kappa.ron | 12 + .../myrmidon/chest}/myrmidon.ron | 0 .../myrmidon/foot}/myrmidon.ron | 0 .../myrmidon/hand}/myrmidon.ron | 0 .../biped_small/myrmidon/head/myrmidon.ron | 12 + .../myrmidon/pants}/myrmidon.ron | 0 .../biped_small/myrmidon/tail/myrmidon.ron | 12 + .../sahagin/chest}/sahagin.ron | 0 .../sahagin/foot}/sahagin.ron | 0 .../sahagin/hand}/sahagin.ron | 0 .../biped_small/sahagin/head/sahagin.ron | 12 + .../sahagin/pants}/sahagin.ron | 0 .../biped_small/sahagin/tail/sahagin.ron | 12 + .../voxel/biped_small_armor_foot_manifest.ron | 4 +- .../voxel/biped_small_armor_hand_manifest.ron | 4 +- .../voxel/biped_small_armor_head_manifest.ron | 40 ++ .../biped_small_armor_pants_manifest.ron | 2 +- .../voxel/biped_small_armor_tail_manifest.ron | 25 ++ .../voxel/biped_small_central_manifest.ron | 362 ------------------ .../voxel/biped_small_lateral_manifest.ron | 202 ---------- assets/voxygen/voxel/npc/adlet/male/head.vox | 3 - common/src/comp/inventory/loadout_builder.rs | 112 ++++-- voxygen/anim/src/biped_large/alpha.rs | 72 ++-- voxygen/anim/src/biped_small/alpha.rs | 43 +-- voxygen/anim/src/character/alpha.rs | 118 +++--- voxygen/anim/src/character/beam.rs | 58 ++- voxygen/anim/src/character/beta.rs | 24 +- voxygen/anim/src/character/charge.rs | 164 -------- voxygen/anim/src/character/chargeswing.rs | 31 +- voxygen/anim/src/character/leapmelee.rs | 72 ++-- voxygen/anim/src/character/mod.rs | 17 +- voxygen/anim/src/character/repeater.rs | 57 ++- voxygen/anim/src/character/shockwave.rs | 46 +-- voxygen/anim/src/character/shoot.rs | 48 ++- voxygen/anim/src/character/spinmelee.rs | 82 ++-- voxygen/src/scene/figure/cache.rs | 12 + voxygen/src/scene/figure/load.rs | 103 ++--- voxygen/src/scene/figure/mod.rs | 10 - voxygen/src/scene/particle.rs | 2 +- world/src/site/dungeon/mod.rs | 22 +- 66 files changed, 669 insertions(+), 1210 deletions(-) rename assets/common/items/npc_armor/{chest/adlet => biped_small/adlet/chest}/adlet_bow.ron (100%) rename assets/common/items/npc_armor/{chest/adlet => biped_small/adlet/chest}/adlet_spear.ron (100%) rename assets/common/items/npc_armor/{foot/adlet => biped_small/adlet/foot}/adlet.ron (100%) rename assets/common/items/npc_armor/{hand/adlet => biped_small/adlet/hand}/adlet_bow.ron (100%) rename assets/common/items/npc_armor/{hand/adlet => biped_small/adlet/hand}/adlet_spear.ron (100%) create mode 100644 assets/common/items/npc_armor/biped_small/adlet/head/adlet_bow.ron create mode 100644 assets/common/items/npc_armor/biped_small/adlet/head/adlet_spear.ron rename assets/common/items/npc_armor/{pants/adlet => biped_small/adlet/pants}/adlet_bow.ron (100%) rename assets/common/items/npc_armor/{pants/adlet => biped_small/adlet/pants}/adlet_spear.ron (100%) create mode 100644 assets/common/items/npc_armor/biped_small/adlet/tail/adlet.ron rename assets/common/items/npc_armor/{chest/gnarling => biped_small/gnarling/chest}/gnarling.ron (100%) rename assets/common/items/npc_armor/{foot/gnarling => biped_small/gnarling/foot}/gnarling.ron (100%) rename assets/common/items/npc_armor/{hand/gnarling => biped_small/gnarling/hand}/gnarling.ron (100%) create mode 100644 assets/common/items/npc_armor/biped_small/gnarling/head/gnarling.ron rename assets/common/items/npc_armor/{pants/gnarling => biped_small/gnarling/pants}/gnarling.ron (100%) create mode 100644 assets/common/items/npc_armor/biped_small/gnarling/tail/gnarling.ron rename assets/common/items/npc_armor/{chest/haniwa => biped_small/haniwa/chest}/haniwa.ron (100%) rename assets/common/items/npc_armor/{foot/haniwa => biped_small/haniwa/foot}/haniwa.ron (100%) rename assets/common/items/npc_armor/{hand/haniwa => biped_small/haniwa/hand}/haniwa.ron (100%) create mode 100644 assets/common/items/npc_armor/biped_small/haniwa/head/haniwa.ron rename assets/common/items/npc_armor/{pants/haniwa => biped_small/haniwa/pants}/haniwa.ron (100%) rename assets/common/items/npc_armor/{chest/kappa => biped_small/kappa/chest}/kappa.ron (100%) rename assets/common/items/npc_armor/{foot/kappa => biped_small/kappa/foot}/kappa.ron (100%) rename assets/common/items/npc_armor/{hand/kappa => biped_small/kappa/hand}/kappa.ron (100%) create mode 100644 assets/common/items/npc_armor/biped_small/kappa/head/kappa.ron rename assets/common/items/npc_armor/{pants/kappa => biped_small/kappa/pants}/kappa.ron (100%) create mode 100644 assets/common/items/npc_armor/biped_small/kappa/tail/kappa.ron rename assets/common/items/npc_armor/{chest/myrmidon => biped_small/myrmidon/chest}/myrmidon.ron (100%) rename assets/common/items/npc_armor/{foot/myrmidon => biped_small/myrmidon/foot}/myrmidon.ron (100%) rename assets/common/items/npc_armor/{hand/myrmidon => biped_small/myrmidon/hand}/myrmidon.ron (100%) create mode 100644 assets/common/items/npc_armor/biped_small/myrmidon/head/myrmidon.ron rename assets/common/items/npc_armor/{pants/myrmidon => biped_small/myrmidon/pants}/myrmidon.ron (100%) create mode 100644 assets/common/items/npc_armor/biped_small/myrmidon/tail/myrmidon.ron rename assets/common/items/npc_armor/{chest/sahagin => biped_small/sahagin/chest}/sahagin.ron (100%) rename assets/common/items/npc_armor/{foot/sahagin => biped_small/sahagin/foot}/sahagin.ron (100%) rename assets/common/items/npc_armor/{hand/sahagin => biped_small/sahagin/hand}/sahagin.ron (100%) create mode 100644 assets/common/items/npc_armor/biped_small/sahagin/head/sahagin.ron rename assets/common/items/npc_armor/{pants/sahagin => biped_small/sahagin/pants}/sahagin.ron (100%) create mode 100644 assets/common/items/npc_armor/biped_small/sahagin/tail/sahagin.ron create mode 100644 assets/voxygen/voxel/biped_small_armor_head_manifest.ron create mode 100644 assets/voxygen/voxel/biped_small_armor_tail_manifest.ron delete mode 100644 assets/voxygen/voxel/biped_small_central_manifest.ron delete mode 100644 assets/voxygen/voxel/biped_small_lateral_manifest.ron delete mode 100644 assets/voxygen/voxel/npc/adlet/male/head.vox delete mode 100644 voxygen/anim/src/character/charge.rs diff --git a/assets/common/items/npc_armor/chest/adlet/adlet_bow.ron b/assets/common/items/npc_armor/biped_small/adlet/chest/adlet_bow.ron similarity index 100% rename from assets/common/items/npc_armor/chest/adlet/adlet_bow.ron rename to assets/common/items/npc_armor/biped_small/adlet/chest/adlet_bow.ron diff --git a/assets/common/items/npc_armor/chest/adlet/adlet_spear.ron b/assets/common/items/npc_armor/biped_small/adlet/chest/adlet_spear.ron similarity index 100% rename from assets/common/items/npc_armor/chest/adlet/adlet_spear.ron rename to assets/common/items/npc_armor/biped_small/adlet/chest/adlet_spear.ron diff --git a/assets/common/items/npc_armor/foot/adlet/adlet.ron b/assets/common/items/npc_armor/biped_small/adlet/foot/adlet.ron similarity index 100% rename from assets/common/items/npc_armor/foot/adlet/adlet.ron rename to assets/common/items/npc_armor/biped_small/adlet/foot/adlet.ron diff --git a/assets/common/items/npc_armor/hand/adlet/adlet_bow.ron b/assets/common/items/npc_armor/biped_small/adlet/hand/adlet_bow.ron similarity index 100% rename from assets/common/items/npc_armor/hand/adlet/adlet_bow.ron rename to assets/common/items/npc_armor/biped_small/adlet/hand/adlet_bow.ron diff --git a/assets/common/items/npc_armor/hand/adlet/adlet_spear.ron b/assets/common/items/npc_armor/biped_small/adlet/hand/adlet_spear.ron similarity index 100% rename from assets/common/items/npc_armor/hand/adlet/adlet_spear.ron rename to assets/common/items/npc_armor/biped_small/adlet/hand/adlet_spear.ron diff --git a/assets/common/items/npc_armor/biped_small/adlet/head/adlet_bow.ron b/assets/common/items/npc_armor/biped_small/adlet/head/adlet_bow.ron new file mode 100644 index 0000000000..5b1a825fea --- /dev/null +++ b/assets/common/items/npc_armor/biped_small/adlet/head/adlet_bow.ron @@ -0,0 +1,12 @@ +ItemDef( + name: "Adlet", + description: "Ceremonial attire used by members.", + kind: Armor(( + kind: Head("AdletBow"), + stats: ( + protection: Normal(2.0), + poise_resilience: Normal(1.0), + ), + )), + quality: Low, +) \ No newline at end of file diff --git a/assets/common/items/npc_armor/biped_small/adlet/head/adlet_spear.ron b/assets/common/items/npc_armor/biped_small/adlet/head/adlet_spear.ron new file mode 100644 index 0000000000..1d17ceea49 --- /dev/null +++ b/assets/common/items/npc_armor/biped_small/adlet/head/adlet_spear.ron @@ -0,0 +1,12 @@ +ItemDef( + name: "Adlet", + description: "Ceremonial attire used by members.", + kind: Armor(( + kind: Head("AdletSpear"), + stats: ( + protection: Normal(2.0), + poise_resilience: Normal(1.0), + ), + )), + quality: Low, +) \ No newline at end of file diff --git a/assets/common/items/npc_armor/pants/adlet/adlet_bow.ron b/assets/common/items/npc_armor/biped_small/adlet/pants/adlet_bow.ron similarity index 100% rename from assets/common/items/npc_armor/pants/adlet/adlet_bow.ron rename to assets/common/items/npc_armor/biped_small/adlet/pants/adlet_bow.ron diff --git a/assets/common/items/npc_armor/pants/adlet/adlet_spear.ron b/assets/common/items/npc_armor/biped_small/adlet/pants/adlet_spear.ron similarity index 100% rename from assets/common/items/npc_armor/pants/adlet/adlet_spear.ron rename to assets/common/items/npc_armor/biped_small/adlet/pants/adlet_spear.ron diff --git a/assets/common/items/npc_armor/biped_small/adlet/tail/adlet.ron b/assets/common/items/npc_armor/biped_small/adlet/tail/adlet.ron new file mode 100644 index 0000000000..d6578b34a1 --- /dev/null +++ b/assets/common/items/npc_armor/biped_small/adlet/tail/adlet.ron @@ -0,0 +1,12 @@ +ItemDef( + name: "Adlet", + description: "Ceremonial attire used by members.", + kind: Armor(( + kind: Belt("Adlet"), + stats: ( + protection: Normal(2.0), + poise_resilience: Normal(1.0), + ), + )), + quality: Low, +) \ No newline at end of file diff --git a/assets/common/items/npc_armor/chest/gnarling/gnarling.ron b/assets/common/items/npc_armor/biped_small/gnarling/chest/gnarling.ron similarity index 100% rename from assets/common/items/npc_armor/chest/gnarling/gnarling.ron rename to assets/common/items/npc_armor/biped_small/gnarling/chest/gnarling.ron diff --git a/assets/common/items/npc_armor/foot/gnarling/gnarling.ron b/assets/common/items/npc_armor/biped_small/gnarling/foot/gnarling.ron similarity index 100% rename from assets/common/items/npc_armor/foot/gnarling/gnarling.ron rename to assets/common/items/npc_armor/biped_small/gnarling/foot/gnarling.ron diff --git a/assets/common/items/npc_armor/hand/gnarling/gnarling.ron b/assets/common/items/npc_armor/biped_small/gnarling/hand/gnarling.ron similarity index 100% rename from assets/common/items/npc_armor/hand/gnarling/gnarling.ron rename to assets/common/items/npc_armor/biped_small/gnarling/hand/gnarling.ron diff --git a/assets/common/items/npc_armor/biped_small/gnarling/head/gnarling.ron b/assets/common/items/npc_armor/biped_small/gnarling/head/gnarling.ron new file mode 100644 index 0000000000..0d6184e2b5 --- /dev/null +++ b/assets/common/items/npc_armor/biped_small/gnarling/head/gnarling.ron @@ -0,0 +1,12 @@ +ItemDef( + name: "Gnarling", + description: "Ceremonial attire used by members.", + kind: Armor(( + kind: Head("Gnarling"), + stats: ( + protection: Normal(2.0), + poise_resilience: Normal(1.0), + ), + )), + quality: Low, +) \ No newline at end of file diff --git a/assets/common/items/npc_armor/pants/gnarling/gnarling.ron b/assets/common/items/npc_armor/biped_small/gnarling/pants/gnarling.ron similarity index 100% rename from assets/common/items/npc_armor/pants/gnarling/gnarling.ron rename to assets/common/items/npc_armor/biped_small/gnarling/pants/gnarling.ron diff --git a/assets/common/items/npc_armor/biped_small/gnarling/tail/gnarling.ron b/assets/common/items/npc_armor/biped_small/gnarling/tail/gnarling.ron new file mode 100644 index 0000000000..93580fa7a0 --- /dev/null +++ b/assets/common/items/npc_armor/biped_small/gnarling/tail/gnarling.ron @@ -0,0 +1,12 @@ +ItemDef( + name: "Gnarling", + description: "Ceremonial attire used by members.", + kind: Armor(( + kind: Belt("Gnarling"), + stats: ( + protection: Normal(2.0), + poise_resilience: Normal(1.0), + ), + )), + quality: Low, +) \ No newline at end of file diff --git a/assets/common/items/npc_armor/chest/haniwa/haniwa.ron b/assets/common/items/npc_armor/biped_small/haniwa/chest/haniwa.ron similarity index 100% rename from assets/common/items/npc_armor/chest/haniwa/haniwa.ron rename to assets/common/items/npc_armor/biped_small/haniwa/chest/haniwa.ron diff --git a/assets/common/items/npc_armor/foot/haniwa/haniwa.ron b/assets/common/items/npc_armor/biped_small/haniwa/foot/haniwa.ron similarity index 100% rename from assets/common/items/npc_armor/foot/haniwa/haniwa.ron rename to assets/common/items/npc_armor/biped_small/haniwa/foot/haniwa.ron diff --git a/assets/common/items/npc_armor/hand/haniwa/haniwa.ron b/assets/common/items/npc_armor/biped_small/haniwa/hand/haniwa.ron similarity index 100% rename from assets/common/items/npc_armor/hand/haniwa/haniwa.ron rename to assets/common/items/npc_armor/biped_small/haniwa/hand/haniwa.ron diff --git a/assets/common/items/npc_armor/biped_small/haniwa/head/haniwa.ron b/assets/common/items/npc_armor/biped_small/haniwa/head/haniwa.ron new file mode 100644 index 0000000000..4f75adb4fa --- /dev/null +++ b/assets/common/items/npc_armor/biped_small/haniwa/head/haniwa.ron @@ -0,0 +1,12 @@ +ItemDef( + name: "Haniwa", + description: "Ceremonial attire used by members.", + kind: Armor(( + kind: Head("Haniwa"), + stats: ( + protection: Normal(2.0), + poise_resilience: Normal(1.0), + ), + )), + quality: Low, +) \ No newline at end of file diff --git a/assets/common/items/npc_armor/pants/haniwa/haniwa.ron b/assets/common/items/npc_armor/biped_small/haniwa/pants/haniwa.ron similarity index 100% rename from assets/common/items/npc_armor/pants/haniwa/haniwa.ron rename to assets/common/items/npc_armor/biped_small/haniwa/pants/haniwa.ron diff --git a/assets/common/items/npc_armor/chest/kappa/kappa.ron b/assets/common/items/npc_armor/biped_small/kappa/chest/kappa.ron similarity index 100% rename from assets/common/items/npc_armor/chest/kappa/kappa.ron rename to assets/common/items/npc_armor/biped_small/kappa/chest/kappa.ron diff --git a/assets/common/items/npc_armor/foot/kappa/kappa.ron b/assets/common/items/npc_armor/biped_small/kappa/foot/kappa.ron similarity index 100% rename from assets/common/items/npc_armor/foot/kappa/kappa.ron rename to assets/common/items/npc_armor/biped_small/kappa/foot/kappa.ron diff --git a/assets/common/items/npc_armor/hand/kappa/kappa.ron b/assets/common/items/npc_armor/biped_small/kappa/hand/kappa.ron similarity index 100% rename from assets/common/items/npc_armor/hand/kappa/kappa.ron rename to assets/common/items/npc_armor/biped_small/kappa/hand/kappa.ron diff --git a/assets/common/items/npc_armor/biped_small/kappa/head/kappa.ron b/assets/common/items/npc_armor/biped_small/kappa/head/kappa.ron new file mode 100644 index 0000000000..0ff22d8e1e --- /dev/null +++ b/assets/common/items/npc_armor/biped_small/kappa/head/kappa.ron @@ -0,0 +1,12 @@ +ItemDef( + name: "Kappa", + description: "Ceremonial attire used by members.", + kind: Armor(( + kind: Head("Kappa"), + stats: ( + protection: Normal(2.0), + poise_resilience: Normal(1.0), + ), + )), + quality: Low, +) \ No newline at end of file diff --git a/assets/common/items/npc_armor/pants/kappa/kappa.ron b/assets/common/items/npc_armor/biped_small/kappa/pants/kappa.ron similarity index 100% rename from assets/common/items/npc_armor/pants/kappa/kappa.ron rename to assets/common/items/npc_armor/biped_small/kappa/pants/kappa.ron diff --git a/assets/common/items/npc_armor/biped_small/kappa/tail/kappa.ron b/assets/common/items/npc_armor/biped_small/kappa/tail/kappa.ron new file mode 100644 index 0000000000..2a65ad930b --- /dev/null +++ b/assets/common/items/npc_armor/biped_small/kappa/tail/kappa.ron @@ -0,0 +1,12 @@ +ItemDef( + name: "Kappa", + description: "Ceremonial attire used by members.", + kind: Armor(( + kind: Belt("Kappa"), + stats: ( + protection: Normal(2.0), + poise_resilience: Normal(1.0), + ), + )), + quality: Low, +) \ No newline at end of file diff --git a/assets/common/items/npc_armor/chest/myrmidon/myrmidon.ron b/assets/common/items/npc_armor/biped_small/myrmidon/chest/myrmidon.ron similarity index 100% rename from assets/common/items/npc_armor/chest/myrmidon/myrmidon.ron rename to assets/common/items/npc_armor/biped_small/myrmidon/chest/myrmidon.ron diff --git a/assets/common/items/npc_armor/foot/myrmidon/myrmidon.ron b/assets/common/items/npc_armor/biped_small/myrmidon/foot/myrmidon.ron similarity index 100% rename from assets/common/items/npc_armor/foot/myrmidon/myrmidon.ron rename to assets/common/items/npc_armor/biped_small/myrmidon/foot/myrmidon.ron diff --git a/assets/common/items/npc_armor/hand/myrmidon/myrmidon.ron b/assets/common/items/npc_armor/biped_small/myrmidon/hand/myrmidon.ron similarity index 100% rename from assets/common/items/npc_armor/hand/myrmidon/myrmidon.ron rename to assets/common/items/npc_armor/biped_small/myrmidon/hand/myrmidon.ron diff --git a/assets/common/items/npc_armor/biped_small/myrmidon/head/myrmidon.ron b/assets/common/items/npc_armor/biped_small/myrmidon/head/myrmidon.ron new file mode 100644 index 0000000000..8da8407ec1 --- /dev/null +++ b/assets/common/items/npc_armor/biped_small/myrmidon/head/myrmidon.ron @@ -0,0 +1,12 @@ +ItemDef( + name: "Myrmidon", + description: "Ceremonial attire used by members.", + kind: Armor(( + kind: Head("Myrmidon"), + stats: ( + protection: Normal(2.0), + poise_resilience: Normal(1.0), + ), + )), + quality: Low, +) \ No newline at end of file diff --git a/assets/common/items/npc_armor/pants/myrmidon/myrmidon.ron b/assets/common/items/npc_armor/biped_small/myrmidon/pants/myrmidon.ron similarity index 100% rename from assets/common/items/npc_armor/pants/myrmidon/myrmidon.ron rename to assets/common/items/npc_armor/biped_small/myrmidon/pants/myrmidon.ron diff --git a/assets/common/items/npc_armor/biped_small/myrmidon/tail/myrmidon.ron b/assets/common/items/npc_armor/biped_small/myrmidon/tail/myrmidon.ron new file mode 100644 index 0000000000..7ab5ceddcf --- /dev/null +++ b/assets/common/items/npc_armor/biped_small/myrmidon/tail/myrmidon.ron @@ -0,0 +1,12 @@ +ItemDef( + name: "Myrmidon", + description: "Ceremonial attire used by members..", + kind: Armor(( + kind: Belt("Myrmidon"), + stats: ( + protection: Normal(2.0), + poise_resilience: Normal(1.0), + ), + )), + quality: Low, +) \ No newline at end of file diff --git a/assets/common/items/npc_armor/chest/sahagin/sahagin.ron b/assets/common/items/npc_armor/biped_small/sahagin/chest/sahagin.ron similarity index 100% rename from assets/common/items/npc_armor/chest/sahagin/sahagin.ron rename to assets/common/items/npc_armor/biped_small/sahagin/chest/sahagin.ron diff --git a/assets/common/items/npc_armor/foot/sahagin/sahagin.ron b/assets/common/items/npc_armor/biped_small/sahagin/foot/sahagin.ron similarity index 100% rename from assets/common/items/npc_armor/foot/sahagin/sahagin.ron rename to assets/common/items/npc_armor/biped_small/sahagin/foot/sahagin.ron diff --git a/assets/common/items/npc_armor/hand/sahagin/sahagin.ron b/assets/common/items/npc_armor/biped_small/sahagin/hand/sahagin.ron similarity index 100% rename from assets/common/items/npc_armor/hand/sahagin/sahagin.ron rename to assets/common/items/npc_armor/biped_small/sahagin/hand/sahagin.ron diff --git a/assets/common/items/npc_armor/biped_small/sahagin/head/sahagin.ron b/assets/common/items/npc_armor/biped_small/sahagin/head/sahagin.ron new file mode 100644 index 0000000000..5d7f9ec81d --- /dev/null +++ b/assets/common/items/npc_armor/biped_small/sahagin/head/sahagin.ron @@ -0,0 +1,12 @@ +ItemDef( + name: "Sahagin", + description: "Ceremonial attire used by members.", + kind: Armor(( + kind: Head("Sahagin"), + stats: ( + protection: Normal(2.0), + poise_resilience: Normal(1.0), + ), + )), + quality: Low, +) \ No newline at end of file diff --git a/assets/common/items/npc_armor/pants/sahagin/sahagin.ron b/assets/common/items/npc_armor/biped_small/sahagin/pants/sahagin.ron similarity index 100% rename from assets/common/items/npc_armor/pants/sahagin/sahagin.ron rename to assets/common/items/npc_armor/biped_small/sahagin/pants/sahagin.ron diff --git a/assets/common/items/npc_armor/biped_small/sahagin/tail/sahagin.ron b/assets/common/items/npc_armor/biped_small/sahagin/tail/sahagin.ron new file mode 100644 index 0000000000..d724d593d8 --- /dev/null +++ b/assets/common/items/npc_armor/biped_small/sahagin/tail/sahagin.ron @@ -0,0 +1,12 @@ +ItemDef( + name: "Sahagin", + description: "Ceremonial attire used by members..", + kind: Armor(( + kind: Belt("Sahagin"), + stats: ( + protection: Normal(2.0), + poise_resilience: Normal(1.0), + ), + )), + quality: Low, +) \ No newline at end of file diff --git a/assets/voxygen/voxel/biped_small_armor_foot_manifest.ron b/assets/voxygen/voxel/biped_small_armor_foot_manifest.ron index fbea5cbe0c..8f16ca7700 100644 --- a/assets/voxygen/voxel/biped_small_armor_foot_manifest.ron +++ b/assets/voxygen/voxel/biped_small_armor_foot_manifest.ron @@ -1,10 +1,10 @@ (( default: ( left: ( - vox_spec: ("armor.foot.foot_right_none", (-1.5, -2.0, -4.0)), + vox_spec: ("armor.empty", (0.0, 0.0, 0.0)), ), right: ( - vox_spec: ("armor.foot.foot_right_none", (-1.5, -2.0, -4.0)), + vox_spec: ("armor.empty", (0.0, 0.0, 0.0)), ) ), map: { diff --git a/assets/voxygen/voxel/biped_small_armor_hand_manifest.ron b/assets/voxygen/voxel/biped_small_armor_hand_manifest.ron index 68b7f72157..30d10a0f42 100644 --- a/assets/voxygen/voxel/biped_small_armor_hand_manifest.ron +++ b/assets/voxygen/voxel/biped_small_armor_hand_manifest.ron @@ -1,10 +1,10 @@ (( default: ( left: ( - vox_spec: ("armor.hand.hand_reft_none", (-3.0, -2.0, -5.0)), + vox_spec: ("armor.empty", (0.0, 0.0, 0.0)), ), right: ( - vox_spec: ("armor.hand.hand_right_none", (-3.0, -2.0, -5.0)), + vox_spec: ("armor.empty", (0.0, 0.0, 0.0)), ) ), map: { diff --git a/assets/voxygen/voxel/biped_small_armor_head_manifest.ron b/assets/voxygen/voxel/biped_small_armor_head_manifest.ron new file mode 100644 index 0000000000..08b8b55326 --- /dev/null +++ b/assets/voxygen/voxel/biped_small_armor_head_manifest.ron @@ -0,0 +1,40 @@ +(( + default: ( + vox_spec: ("armor.empty", (0.0, 0.0, 0.0)), + ), + map: { + "Gnome": ( + vox_spec: ("npc.gnome.male.head", (-8.0, -6.5, -12.0)), + ), + "Sahagin": ( + vox_spec: ("npc.sahagin.male.head", (-2.5, 0.0, -4.5)), + ), + "AdletSpear": ( + vox_spec: ("npc.adlet.male.spear.head", (-7.0, -4.5, -6.0)), + ), + "AdletBow": ( + vox_spec: ("npc.adlet.male.bow.head", (-7.0, -4.5, -6.0)), + ), + "Gnarling": ( + vox_spec: ("npc.gnarling.male.head", (-6.5, -5.5, -4.5)), + ), + "Mandragora": ( + vox_spec: ("npc.mandragora.male.head", (0.0, 0.0, 0.0)), + ), + "Kappa": ( + vox_spec: ("npc.kappa.male.chest", (-4.5, -5.0, -4.5)), + ), + "Cactid": ( + vox_spec: ("npc.cactid.male.head", (-8.0, -4.0, -7.5)), + ), + "Gnoll": ( + vox_spec: ("npc.gnoll.male.head", (-4.0, -1.5, -3.0)), + ), + "Haniwa": ( + vox_spec: ("npc.haniwa.male.head", (-5.5, -5.5, -5.5)), + ), + "Myrmidon": ( + vox_spec: ("npc.myrmidon.male.head", (-4.5, -7.0, -6.5)), + ), + }, +)) diff --git a/assets/voxygen/voxel/biped_small_armor_pants_manifest.ron b/assets/voxygen/voxel/biped_small_armor_pants_manifest.ron index bf0419402f..be48415201 100644 --- a/assets/voxygen/voxel/biped_small_armor_pants_manifest.ron +++ b/assets/voxygen/voxel/biped_small_armor_pants_manifest.ron @@ -1,6 +1,6 @@ (( default: ( - vox_spec: ("armor.pants.pants_none", (-5.0, -3.5, 1.0)), + vox_spec: ("armor.empty", (0.0, 0.0, 0.0)), ), map: { "Gnome": ( diff --git a/assets/voxygen/voxel/biped_small_armor_tail_manifest.ron b/assets/voxygen/voxel/biped_small_armor_tail_manifest.ron new file mode 100644 index 0000000000..97f8e3325e --- /dev/null +++ b/assets/voxygen/voxel/biped_small_armor_tail_manifest.ron @@ -0,0 +1,25 @@ +(( + default: ( + vox_spec: ("armor.empty", (0.0, 0.0, 0.0)), + ), + map: { + "Sahagin": ( + vox_spec: ("npc.sahagin.male.tail", (-1.5, -13.0, -5.0)), + ), + "Adlet": ( + vox_spec: ("npc.adlet.male.tail", (-1.0, -5.0, -1.0)), + ), + "Gnarling": ( + vox_spec: ("npc.gnarling.male.tail", (-1.5, -13.0, -3.0)), + ), + "Kappa": ( + vox_spec: ("npc.kappa.male.tail", (-2.5, -10.0, -5.0)), + ), + "Gnoll": ( + vox_spec: ("npc.gnoll.male.tail", (-1.0, -11.0, -1.0)), + ), + "Myrmidon": ( + vox_spec: ("npc.myrmidon.male.tail", (-2.5, -7.0, -2.5)), + ), + }, +)) diff --git a/assets/voxygen/voxel/biped_small_central_manifest.ron b/assets/voxygen/voxel/biped_small_central_manifest.ron deleted file mode 100644 index 7760739b99..0000000000 --- a/assets/voxygen/voxel/biped_small_central_manifest.ron +++ /dev/null @@ -1,362 +0,0 @@ -({ - (Gnome, Male): ( - head: ( - offset: (-8.0, -6.5, -12.0), - central: ("npc.gnome.male.head"), - ), - chest: ( - offset: (-5.0, -3.0, -2.5), - central: ("npc.gnome.male.chest"), - ), - shorts: ( - offset: (-4.0, -3.5, -2.5), - central: ("npc.gnome.male.shorts"), - ), - tail: ( - offset: (-0.5, -5.0, -2.5), - central: ("armor.empty"), - ), - ), - (Gnome, Female): ( - head: ( - offset: (-8.0, -6.5, -12.0), - central: ("npc.gnome.male.head"), - ), - chest: ( - offset: (-5.0, -3.0, -2.5), - central: ("npc.gnome.male.chest"), - ), - shorts: ( - offset: (-4.0, -3.5, -2.5), - central: ("npc.gnome.male.shorts"), - ), - tail: ( - offset: (-0.5, -5.0, -2.5), - central: ("armor.empty"), - ), - ), - (Sahagin, Male): ( - head: ( - offset: (-2.5, 0.0, -4.5), - central: ("npc.sahagin.male.head"), - ), - chest: ( - offset: (-4.5, -8.0, -8.0), - central: ("npc.sahagin.male.chest"), - ), - shorts: ( - offset: (-2.5, -3.5, -2.0), - central: ("npc.sahagin.male.shorts"), - ), - tail: ( - offset: (-1.5, -13.0, -5.0), - central: ("npc.sahagin.male.tail"), - ), - ), - (Sahagin, Female): ( - head: ( - offset: (-2.5, 0.0, -4.5), - central: ("npc.sahagin.male.head"), - ), - chest: ( - offset: (-4.5, -8.0, -8.0), - central: ("npc.sahagin.male.chest"), - ), - shorts: ( - offset: (-2.5, -3.5, -2.0), - central: ("npc.sahagin.male.shorts"), - ), - tail: ( - offset: (-1.5, -13.0, -5.0), - central: ("npc.sahagin.male.tail"), - ), - ), - (Adlet, Male): ( - head: ( - offset: (-7.0, -4.5, -6.0), - central: ("npc.adlet.male.head"), - ), - chest: ( - offset: (-5.0, -3.5, -2.0), - central: ("npc.adlet.male.chest"), - ), - shorts: ( - offset: (-5.0, -4.5, -3.0), - central: ("npc.adlet.male.shorts"), - ), - tail: ( - offset: (-1.0, -5.0, -1.0), - central: ("npc.adlet.male.tail"), - ), - ), - (Adlet, Female): ( - head: ( - offset: (-7.0, -4.5, -6.0), - central: ("npc.adlet.male.head"), - ), - chest: ( - offset: (-5.0, -3.5, -2.0), - central: ("npc.adlet.male.chest"), - ), - shorts: ( - offset: (-5.0, -4.5, -3.0), - central: ("npc.adlet.male.shorts"), - ), - tail: ( - offset: (-1.0, -5.0, -1.0), - central: ("npc.adlet.male.tail"), - ), - ), - (Gnarling, Male): ( - head: ( - offset: (-6.5, -5.5, -4.5), - central: ("npc.gnarling.male.head"), - ), - chest: ( - offset: (-4.5, -3.5, -2.5), - central: ("npc.gnarling.male.chest"), - ), - shorts: ( - offset: (-3.5, -3.0, -2.5), - central: ("npc.gnarling.male.shorts"), - ), - tail: ( - offset: (-1.5, -13.0, -3.0), - central: ("npc.gnarling.male.tail"), - ), - ), - (Gnarling, Female): ( - head: ( - offset: (-6.5, -5.5, -4.5), - central: ("npc.gnarling.male.head"), - ), - chest: ( - offset: (-4.5, -3.5, -2.5), - central: ("npc.gnarling.male.chest"), - ), - shorts: ( - offset: (-3.5, -3.0, -2.5), - central: ("npc.gnarling.male.shorts"), - ), - tail: ( - offset: (-1.5, -13.0, -3.0), - central: ("npc.gnarling.male.tail"), - ), - ), - (Mandragora, Male): ( - head: ( - offset: (0.0, 0.0, 0.0), - central: ("armor.empty"), - ), - chest: ( - offset: (-11.0, -11.0, -6.5), - central: ("npc.mandragora.male.chest"), - ), - shorts: ( - offset: (-3.0, -3.0, -1.0), - central: ("npc.mandragora.male.shorts"), - ), - tail: ( - offset: (0.0, 0.0, 0.0), - central: ("armor.empty"), - ), - ), - (Mandragora, Female): ( - head: ( - offset: (0.0, 0.0, 0.0), - central: ("armor.empty"), - ), - chest: ( - offset: (-11.0, -11.0, -6.5), - central: ("npc.mandragora.male.chest"), - ), - shorts: ( - offset: (-3.0, -3.0, -1.0), - central: ("npc.mandragora.male.shorts"), - ), - tail: ( - offset: (0.0, 0.0, 0.0), - central: ("armor.empty"), - ), - ), - (Kappa, Male): ( - head: ( - offset: (-4.5, -5.0, -4.5), - central: ("npc.kappa.male.head"), - ), - chest: ( - offset: (-6.5, -8.0, -7.0), - central: ("npc.kappa.male.chest"), - ), - shorts: ( - offset: (-3.5, -4.0, -1.5), - central: ("npc.kappa.male.shorts"), - ), - tail: ( - offset: (-2.5, -10.0, -5.0), - central: ("npc.kappa.male.tail"), - ), - ), - (Kappa, Female): ( - head: ( - offset: (-4.5, -5.0, -4.5), - central: ("npc.kappa.male.head"), - ), - chest: ( - offset: (-6.5, -8.0, -7.0), - central: ("npc.kappa.male.chest"), - ), - shorts: ( - offset: (-3.5, -4.0, -1.5), - central: ("npc.kappa.male.shorts"), - ), - tail: ( - offset: (-2.5, -10.0, -5.0), - central: ("npc.kappa.male.tail"), - ), - ), - (Cactid, Male): ( - head: ( - offset: (-8.0, -4.0, -7.5), - central: ("npc.cactid.male.head"), - ), - chest: ( - offset: (-3.0, -3.0, -2.5), - central: ("npc.cactid.male.chest"), - ), - shorts: ( - offset: (-3.0, -2.0, -1.0), - central: ("npc.cactid.male.shorts"), - ), - tail: ( - offset: (0.0, 0.0, 0.0), - central: ("armor.empty"), - ), - ), - (Cactid, Female): ( - head: ( - offset: (-8.0, -4.0, -7.5), - central: ("npc.cactid.male.head"), - ), - chest: ( - offset: (-3.0, -3.0, -2.5), - central: ("npc.cactid.male.chest"), - ), - shorts: ( - offset: (-3.0, -2.0, -1.0), - central: ("npc.cactid.male.shorts"), - ), - tail: ( - offset: (0.0, 0.0, 0.0), - central: ("armor.empty"), - ), - ), - (Gnoll, Male): ( - head: ( - offset: (-4.0, -1.5, -3.0), - central: ("npc.gnoll.male.head"), - ), - chest: ( - offset: (-5.0, -4.5, -6.0), - central: ("npc.gnoll.male.chest"), - ), - shorts: ( - offset: (-5.0, -4.0, -3.0), - central: ("npc.gnoll.male.shorts"), - ), - tail: ( - offset: (-1.0, -11.0, -1.0), - central: ("npc.gnoll.male.tail"), - ), - ), - (Gnoll, Female): ( - head: ( - offset: (-4.0, -1.5, -3.0), - central: ("npc.gnoll.male.head"), - ), - chest: ( - offset: (-5.0, -4.5, -6.0), - central: ("npc.gnoll.male.chest"), - ), - shorts: ( - offset: (-5.0, -4.0, -3.0), - central: ("npc.gnoll.male.shorts"), - ), - tail: ( - offset: (-1.0, -11.0, -1.0), - central: ("npc.gnoll.male.tail"), - ), - ), - (Haniwa, Male): ( - head: ( - offset: (-5.5, -5.5, -5.5), - central: ("npc.haniwa.male.head"), - ), - chest: ( - offset: (-6.5, -4.0, -3.0), - central: ("npc.haniwa.male.chest"), - ), - shorts: ( - offset: (-4.5, -4.5, -1.5), - central: ("npc.haniwa.male.shorts"), - ), - tail: ( - offset: (0.0, 0.0, 0.0), - central: ("armor.empty"), - ), - ), - (Haniwa, Female): ( - head: ( - offset: (-5.5, -5.5, -5.5), - central: ("npc.haniwa.male.head"), - ), - chest: ( - offset: (-6.5, -4.0, -3.0), - central: ("npc.haniwa.male.chest"), - ), - shorts: ( - offset: (-4.5, -4.5, -1.5), - central: ("npc.haniwa.male.shorts"), - ), - tail: ( - offset: (0.0, 0.0, 0.0), - central: ("armor.empty"), - ), - ), - (Myrmidon, Male): ( - head: ( - offset: (-4.5, -7.0, -6.5), - central: ("npc.myrmidon.male.head"), - ), - chest: ( - offset: (-5.5, -4.0, -3.0), - central: ("npc.myrmidon.male.chest"), - ), - shorts: ( - offset: (-2.5, -3.5, -2.0), - central: ("npc.myrmidon.male.shorts"), - ), - tail: ( - offset: (-2.5, -7.0, -2.5), - central: ("npc.myrmidon.male.tail"), - ), - ), - (Myrmidon, Female): ( - head: ( - offset: (-4.5, -7.0, -6.5), - central: ("npc.myrmidon.male.head"), - ), - chest: ( - offset: (-5.5, -4.0, -3.0), - central: ("npc.myrmidon.male.chest"), - ), - shorts: ( - offset: (-2.5, -3.5, -2.0), - central: ("npc.myrmidon.male.shorts"), - ), - tail: ( - offset: (-2.5, -7.0, -2.5), - central: ("npc.myrmidon.male.tail"), - ), - ), -}) diff --git a/assets/voxygen/voxel/biped_small_lateral_manifest.ron b/assets/voxygen/voxel/biped_small_lateral_manifest.ron deleted file mode 100644 index 81763b9a6b..0000000000 --- a/assets/voxygen/voxel/biped_small_lateral_manifest.ron +++ /dev/null @@ -1,202 +0,0 @@ -({ - (Gnome, Male): ( - foot_l: ( - offset: (-1.5, -2.0, -4.0), - lateral: ("npc.gnome.male.foot_l"), - ), - foot_r: ( - offset: (-1.5, -2.0, -4.0), - lateral: ("npc.gnome.male.foot_r"), - ), - ), - (Gnome, Female): ( - foot_l: ( - offset: (-1.5, -2.0, -4.0), - lateral: ("npc.gnome.male.foot_l"), - ), - foot_r: ( - offset: (-1.5, -2.0, -4.0), - lateral: ("npc.gnome.male.foot_r"), - ), - ), - (Sahagin, Male): ( - foot_l: ( - offset: (-2.5, -2.0, -8.0), - lateral: ("npc.sahagin.male.foot_l"), - ), - foot_r: ( - offset: (-2.5, -2.0, -8.0), - lateral: ("npc.sahagin.male.foot_r"), - ), - ), - (Sahagin, Female): ( - foot_l: ( - offset: (-2.5, -2.0, -8.0), - lateral: ("npc.sahagin.male.foot_l"), - ), - foot_r: ( - offset: (-2.5, -2.0, -8.0), - lateral: ("npc.sahagin.male.foot_r"), - ), - ), - (Adlet, Male): ( - foot_l: ( - offset: (-1.5, -3.0, -7.0), - lateral: ("npc.adlet.male.foot_l"), - ), - foot_r: ( - offset: (-1.5, -3.0, -7.0), - lateral: ("npc.adlet.male.foot_r"), - ), - ), - (Adlet, Female): ( - foot_l: ( - offset: (-1.5, -3.0, -7.0), - lateral: ("npc.adlet.male.foot_l"), - ), - foot_r: ( - offset: (-1.5, -3.0, -7.0), - lateral: ("npc.adlet.male.foot_r"), - ), - ), - (Gnarling, Male): ( - foot_l: ( - offset: (-1.0, -2.0, -5.0), - lateral: ("npc.gnarling.male.foot_l"), - ), - foot_r: ( - offset: (-1.0, -2.0, -5.0), - lateral: ("npc.gnarling.male.foot_r"), - ), - ), - (Gnarling, Female): ( - foot_l: ( - offset: (-1.0, -2.0, -5.0), - lateral: ("npc.gnarling.male.foot_l"), - ), - foot_r: ( - offset: (-1.0, -2.0, -5.0), - lateral: ("npc.gnarling.male.foot_r"), - ), - ), - (Mandragora, Male): ( - foot_l: ( - offset: (-1.0, -1.5, -4.0), - lateral: ("npc.mandragora.male.foot_l"), - ), - foot_r: ( - offset: (-1.0, -1.5, -4.0), - lateral: ("npc.mandragora.male.foot_r"), - ), - ), - (Mandragora, Female): ( - foot_l: ( - offset: (-1.0, -1.5, -4.0), - lateral: ("npc.mandragora.male.foot_l"), - ), - foot_r: ( - offset: (-1.0, -1.5, -4.0), - lateral: ("npc.mandragora.male.foot_r"), - ), - ), - (Kappa, Male): ( - foot_l: ( - offset: (-2.5, -3.0, -9.0), - lateral: ("npc.kappa.male.foot_l"), - ), - foot_r: ( - offset: (-2.5, -3.0, -9.0), - lateral: ("npc.kappa.male.foot_r"), - ), - ), - (Kappa, Female): ( - foot_l: ( - offset: (-2.5, -3.0, -9.0), - lateral: ("npc.kappa.male.foot_l"), - ), - foot_r: ( - offset: (-2.5, -3.0, -9.0), - lateral: ("npc.kappa.male.foot_r"), - ), - ), - (Cactid, Male): ( - foot_l: ( - offset: (-1.5, -2.0, -5.0), - lateral: ("npc.cactid.male.foot_l"), - ), - foot_r: ( - offset: (-1.5, -2.0, -5.0), - lateral: ("npc.cactid.male.foot_r"), - ), - ), - (Cactid, Female): ( - foot_l: ( - offset: (-1.5, -2.0, -5.0), - lateral: ("npc.cactid.male.foot_l"), - ), - foot_r: ( - offset: (-1.5, -2.0, -5.0), - lateral: ("npc.cactid.male.foot_r"), - ), - ), - (Gnoll, Male): ( - foot_l: ( - offset: (-1.5, -3.0, -7.0), - lateral: ("npc.gnoll.male.foot_l"), - ), - foot_r: ( - offset: (-1.5, -3.0, -7.0), - lateral: ("npc.gnoll.male.foot_r"), - ), - ), - (Gnoll, Female): ( - foot_l: ( - offset: (-1.5, -3.0, -7.0), - lateral: ("npc.gnoll.male.foot_l"), - ), - foot_r: ( - offset: (-1.5, -3.0, -7.0), - lateral: ("npc.gnoll.male.foot_r"), - ), - ), - (Haniwa, Male): ( - foot_l: ( - offset: (-2.0, -2.5, -8.0), - lateral: ("npc.haniwa.male.foot_l"), - ), - foot_r: ( - offset: (-2.0, -2.5, -8.0), - lateral: ("npc.haniwa.male.foot_r"), - ), - ), - (Haniwa, Female): ( - foot_l: ( - offset: (-2.0, -2.5, -8.0), - lateral: ("npc.haniwa.male.foot_l"), - ), - foot_r: ( - offset: (-2.0, -2.5, -8.0), - lateral: ("npc.haniwa.male.foot_r"), - ), - ), - (Myrmidon, Male): ( - foot_l: ( - offset: (-1.5, -2.5, -7.0), - lateral: ("npc.myrmidon.male.foot_l"), - ), - foot_r: ( - offset: (-1.5, -2.5, -7.0), - lateral: ("npc.myrmidon.male.foot_r"), - ), - ), - (Myrmidon, Female): ( - foot_l: ( - offset: (-1.5, -2.5, -7.0), - lateral: ("npc.myrmidon.male.foot_l"), - ), - foot_r: ( - offset: (-1.5, -2.5, -7.0), - lateral: ("npc.myrmidon.male.foot_r"), - ), - ), -}) diff --git a/assets/voxygen/voxel/npc/adlet/male/head.vox b/assets/voxygen/voxel/npc/adlet/male/head.vox deleted file mode 100644 index 26a71c9cec..0000000000 --- a/assets/voxygen/voxel/npc/adlet/male/head.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a936f5a25ab1b9dcc72f7824b00b743ae7866822cfc4764238bfa9419a5d9a0f -size 3336 diff --git a/common/src/comp/inventory/loadout_builder.rs b/common/src/comp/inventory/loadout_builder.rs index 1bc0e59ea7..8e0112b698 100644 --- a/common/src/comp/inventory/loadout_builder.rs +++ b/common/src/comp/inventory/loadout_builder.rs @@ -289,32 +289,44 @@ impl LoadoutBuilder { Adlet => match active_tool_kind { Some(ToolKind::Bow) => LoadoutBuilder::new() .active_item(active_item) + .head(Some(Item::new_from_asset_expect( + "common.items.npc_armor.biped_small.adlet.head.adlet_bow", + ))) .hands(Some(Item::new_from_asset_expect( - "common.items.npc_armor.hand.adlet.adlet_bow", + "common.items.npc_armor.biped_small.adlet.hand.adlet_bow", ))) .feet(Some(Item::new_from_asset_expect( - "common.items.npc_armor.foot.adlet.adlet", + "common.items.npc_armor.biped_small.adlet.foot.adlet", ))) .chest(Some(Item::new_from_asset_expect( - "common.items.npc_armor.chest.adlet.adlet_bow", + "common.items.npc_armor.biped_small.adlet.chest.adlet_bow", ))) .pants(Some(Item::new_from_asset_expect( - "common.items.npc_armor.pants.adlet.adlet_bow", + "common.items.npc_armor.biped_small.adlet.pants.adlet_bow", + ))) + .belt(Some(Item::new_from_asset_expect( + "common.items.npc_armor.biped_small.adlet.tail.adlet", ))) .build(), Some(ToolKind::Spear) | Some(ToolKind::Staff) => LoadoutBuilder::new() .active_item(active_item) + .head(Some(Item::new_from_asset_expect( + "common.items.npc_armor.biped_small.adlet.head.adlet_spear", + ))) .hands(Some(Item::new_from_asset_expect( - "common.items.npc_armor.hand.adlet.adlet_spear", + "common.items.npc_armor.biped_small.adlet.hand.adlet_spear", ))) .feet(Some(Item::new_from_asset_expect( - "common.items.npc_armor.foot.adlet.adlet", + "common.items.npc_armor.biped_small.adlet.foot.adlet", ))) .chest(Some(Item::new_from_asset_expect( - "common.items.npc_armor.chest.adlet.adlet_spear", + "common.items.npc_armor.biped_small.adlet.chest.adlet_spear", ))) .pants(Some(Item::new_from_asset_expect( - "common.items.npc_armor.pants.adlet.adlet_spear", + "common.items.npc_armor.biped_small.adlet.pants.adlet_spear", + ))) + .belt(Some(Item::new_from_asset_expect( + "common.items.npc_armor.biped_small.adlet.tail.adlet", ))) .build(), _ => LoadoutBuilder::new().active_item(active_item).build(), @@ -322,94 +334,124 @@ impl LoadoutBuilder { Gnarling => match active_tool_kind { Some(ToolKind::Bow) => LoadoutBuilder::new() .active_item(active_item) + .head(Some(Item::new_from_asset_expect( + "common.items.npc_armor.biped_small.gnarling.head.gnarling", + ))) .feet(Some(Item::new_from_asset_expect( - "common.items.npc_armor.foot.gnarling.gnarling", + "common.items.npc_armor.biped_small.gnarling.foot.gnarling", ))) .hands(Some(Item::new_from_asset_expect( - "common.items.npc_armor.hand.gnarling.gnarling", + "common.items.npc_armor.biped_small.gnarling.hand.gnarling", ))) .chest(Some(Item::new_from_asset_expect( - "common.items.npc_armor.chest.gnarling.gnarling", + "common.items.npc_armor.biped_small.gnarling.chest.gnarling", ))) .pants(Some(Item::new_from_asset_expect( - "common.items.npc_armor.pants.gnarling.gnarling", + "common.items.npc_armor.biped_small.gnarling.pants.gnarling", + ))) + .belt(Some(Item::new_from_asset_expect( + "common.items.npc_armor.biped_small.gnarling.tail.gnarling", ))) .build(), Some(ToolKind::Staff) => LoadoutBuilder::new() .active_item(active_item) + .head(Some(Item::new_from_asset_expect( + "common.items.npc_armor.biped_small.gnarling.head.gnarling", + ))) .feet(Some(Item::new_from_asset_expect( - "common.items.npc_armor.foot.gnarling.gnarling", + "common.items.npc_armor.biped_small.gnarling.foot.gnarling", ))) .hands(Some(Item::new_from_asset_expect( - "common.items.npc_armor.hand.gnarling.gnarling", + "common.items.npc_armor.biped_small.gnarling.hand.gnarling", ))) .chest(Some(Item::new_from_asset_expect( - "common.items.npc_armor.chest.gnarling.gnarling", + "common.items.npc_armor.biped_small.gnarling.chest.gnarling", ))) .pants(Some(Item::new_from_asset_expect( - "common.items.npc_armor.pants.gnarling.gnarling", + "common.items.npc_armor.biped_small.gnarling.pants.gnarling", + ))) + .belt(Some(Item::new_from_asset_expect( + "common.items.npc_armor.biped_small.gnarling.tail.gnarling", ))) .build(), Some(ToolKind::Spear) => LoadoutBuilder::new() .active_item(active_item) + .head(Some(Item::new_from_asset_expect( + "common.items.npc_armor.biped_small.gnarling.head.gnarling", + ))) .feet(Some(Item::new_from_asset_expect( - "common.items.npc_armor.foot.gnarling.gnarling", + "common.items.npc_armor.biped_small.gnarling.foot.gnarling", ))) .hands(Some(Item::new_from_asset_expect( - "common.items.npc_armor.hand.gnarling.gnarling", + "common.items.npc_armor.biped_small.gnarling.hand.gnarling", ))) .chest(Some(Item::new_from_asset_expect( - "common.items.npc_armor.chest.gnarling.gnarling", + "common.items.npc_armor.biped_small.gnarling.chest.gnarling", ))) .pants(Some(Item::new_from_asset_expect( - "common.items.npc_armor.pants.gnarling.gnarling", + "common.items.npc_armor.biped_small.gnarling.pants.gnarling", ))) .build(), _ => LoadoutBuilder::new().active_item(active_item).build(), }, Sahagin => LoadoutBuilder::new() .active_item(active_item) - .hands(Some(Item::new_from_asset_expect( - "common.items.npc_armor.hand.sahagin.sahagin", + .head(Some(Item::new_from_asset_expect( + "common.items.npc_armor.biped_small.sahagin.head.sahagin", ))) .feet(Some(Item::new_from_asset_expect( - "common.items.npc_armor.foot.sahagin.sahagin", + "common.items.npc_armor.biped_small.sahagin.foot.sahagin", + ))) + .hands(Some(Item::new_from_asset_expect( + "common.items.npc_armor.biped_small.sahagin.hand.sahagin", ))) .chest(Some(Item::new_from_asset_expect( - "common.items.npc_armor.chest.sahagin.sahagin", + "common.items.npc_armor.biped_small.sahagin.chest.sahagin", ))) .pants(Some(Item::new_from_asset_expect( - "common.items.npc_armor.pants.sahagin.sahagin", + "common.items.npc_armor.biped_small.sahagin.pants.sahagin", + ))) + .belt(Some(Item::new_from_asset_expect( + "common.items.npc_armor.biped_small.sahagin.belt.sahagin", ))) .build(), Haniwa => LoadoutBuilder::new() .active_item(active_item) - .hands(Some(Item::new_from_asset_expect( - "common.items.npc_armor.hand.haniwa.haniwa", + .head(Some(Item::new_from_asset_expect( + "common.items.npc_armor.biped_small.haniwa.head.haniwa", ))) .feet(Some(Item::new_from_asset_expect( - "common.items.npc_armor.foot.haniwa.haniwa", + "common.items.npc_armor.biped_small.haniwa.foot.haniwa", + ))) + .hands(Some(Item::new_from_asset_expect( + "common.items.npc_armor.biped_small.haniwa.hand.haniwa", ))) .chest(Some(Item::new_from_asset_expect( - "common.items.npc_armor.chest.haniwa.haniwa", + "common.items.npc_armor.biped_small.haniwa.chest.haniwa", ))) .pants(Some(Item::new_from_asset_expect( - "common.items.npc_armor.pants.haniwa.haniwa", + "common.items.npc_armor.biped_small.haniwa.pants.haniwa", ))) .build(), Myrmidon => LoadoutBuilder::new() .active_item(active_item) - .hands(Some(Item::new_from_asset_expect( - "common.items.npc_armor.hand.myrmidon.myrmidon", + .head(Some(Item::new_from_asset_expect( + "common.items.npc_armor.biped_small.myrmidon.head.myrmidon", ))) .feet(Some(Item::new_from_asset_expect( - "common.items.npc_armor.foot.myrmidon.myrmidon", + "common.items.npc_armor.biped_small.myrmidon.foot.myrmidon", + ))) + .hands(Some(Item::new_from_asset_expect( + "common.items.npc_armor.biped_small.myrmidon.hand.myrmidon", ))) .chest(Some(Item::new_from_asset_expect( - "common.items.npc_armor.chest.myrmidon.myrmidon", + "common.items.npc_armor.biped_small.myrmidon.chest.myrmidon", ))) .pants(Some(Item::new_from_asset_expect( - "common.items.npc_armor.pants.myrmidon.myrmidon", + "common.items.npc_armor.biped_small.myrmidon.pants.myrmidon", + ))) + .belt(Some(Item::new_from_asset_expect( + "common.items.npc_armor.biped_small.myrmidon.belt.myrmidon", ))) .build(), Guard => LoadoutBuilder::new() diff --git a/voxygen/anim/src/biped_large/alpha.rs b/voxygen/anim/src/biped_large/alpha.rs index 2e749fcd06..3fcb8c6e24 100644 --- a/voxygen/anim/src/biped_large/alpha.rs +++ b/voxygen/anim/src/biped_large/alpha.rs @@ -45,33 +45,31 @@ impl Animation for AlphaAnimation { let footrotr = (((1.0) / (0.5 + (0.5) * ((acc_vel * lab as f32 + PI * 0.4).sin()).powi(2))).sqrt()) * ((acc_vel * lab as f32 + PI * 0.4).sin()); - let (movement1base, movement2base, movement3) = match stage_section { + let (move1base, move2base, move3) = match stage_section { Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0), Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0), Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4)), _ => (0.0, 0.0, 0.0), }; - let pullback = 1.0 - movement3; - let movement1 = movement1base * pullback; - let movement2 = movement2base * pullback; + let pullback = 1.0 - move3; + let move1 = move1base * pullback; + let move2 = move2base * pullback; next.shoulder_l.position = Vec3::new( -s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2 - foothorir * 1.0, ); - next.shoulder_l.orientation = Quaternion::rotation_x( - movement1 * 0.8 + 0.6 * speednorm + (footrotr * -0.2) * speednorm, - ); + next.shoulder_l.orientation = + Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotr * -0.2) * speednorm); next.shoulder_r.position = Vec3::new( s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2 - foothoril * 1.0, ); - next.shoulder_r.orientation = Quaternion::rotation_x( - movement1 * 0.8 + 0.6 * speednorm + (footrotl * -0.2) * speednorm, - ); + next.shoulder_r.orientation = + Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotl * -0.2) * speednorm); next.torso.orientation = Quaternion::rotation_z(0.0); next.main.position = Vec3::new(0.0, 0.0, 0.0); @@ -87,53 +85,51 @@ impl Animation for AlphaAnimation { Some(ToolKind::SwordSimple) => { next.control_l.position = Vec3::new(-1.0, 1.0, 1.0); next.control_r.position = Vec3::new(0.0, 2.0, -3.0); - next.head.orientation = Quaternion::rotation_x(movement1 * -0.25) - * Quaternion::rotation_z(movement1 * -0.2 + movement2 * 0.6); + next.head.orientation = Quaternion::rotation_x(move1 * -0.25) + * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6); next.control.position = Vec3::new( - -3.0 + movement1 * -4.0 + movement2 * 5.0, - 5.0 + s_a.grip / 1.2 + movement1 * -4.0 + movement2 * 8.0, - -4.0 + -s_a.grip / 2.0 + movement2 * -5.0, + -3.0 + move1 * -4.0 + move2 * 5.0, + 5.0 + s_a.grip / 1.2 + move1 * -4.0 + move2 * 8.0, + -4.0 + -s_a.grip / 2.0 + move2 * -5.0, ); next.upper_torso.orientation = - Quaternion::rotation_z(movement1base * 0.5 + movement2 * -0.7); + Quaternion::rotation_z(move1base * 0.5 + move2 * -0.7); next.lower_torso.orientation = - Quaternion::rotation_z(movement1base * -0.5 + movement2 * 0.7); + Quaternion::rotation_z(move1base * -0.5 + move2 * 0.7); next.control_l.orientation = - Quaternion::rotation_x(PI / 2.0 + movement1 * -0.5 + movement2 * 1.5) + Quaternion::rotation_x(PI / 2.0 + move1 * -0.5 + move2 * 1.5) * Quaternion::rotation_y(-0.2); next.control_r.orientation = - Quaternion::rotation_x(PI / 2.2 + movement1 * -0.5 + movement2 * 1.5) + Quaternion::rotation_x(PI / 2.2 + move1 * -0.5 + move2 * 1.5) * Quaternion::rotation_y(0.2) * Quaternion::rotation_z(0.0); next.control.orientation = - Quaternion::rotation_x(-0.2 + movement1 * 0.5 + movement2 * -1.5) - * Quaternion::rotation_y(-0.1 + movement1 * -0.5 + movement2 * 1.0); + Quaternion::rotation_x(-0.2 + move1 * 0.5 + move2 * -1.5) + * Quaternion::rotation_y(-0.1 + move1 * -0.5 + move2 * 1.0); }, Some(ToolKind::HammerSimple) => { - next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + movement2 * -10.0); + next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0); next.control_r.position = Vec3::new(1.0, 2.0, -2.0); next.control.position = Vec3::new( - 4.0 + movement1 * -12.0 + movement2 * 20.0, - (s_a.grip / 1.0) + movement1 * -3.0 + movement2 * 5.0, - (-s_a.grip / 0.8) + movement1 * -2.0 + movement2 * 8.0, + 4.0 + move1 * -12.0 + move2 * 20.0, + (s_a.grip / 1.0) + move1 * -3.0 + move2 * 5.0, + (-s_a.grip / 0.8) + move1 * -2.0 + move2 * 8.0, ); - next.head.orientation = Quaternion::rotation_x(movement1 * -0.25) - * Quaternion::rotation_z(movement1 * -0.2 + movement2 * 0.6); - next.upper_torso.orientation = - Quaternion::rotation_z(movement1 * 0.2 + movement2 * -0.4); - next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + movement2 * 0.8) - * Quaternion::rotation_y(-0.0); - next.control_r.orientation = - Quaternion::rotation_x(PI / 2.0 + 0.2 + movement2 * 0.8) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); + next.head.orientation = Quaternion::rotation_x(move1 * -0.25) + * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6); + next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.2 + move2 * -0.4); + next.control_l.orientation = + Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0); + next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); next.control.orientation = - Quaternion::rotation_x(-1.0 + movement1 * -0.5 + movement2 * -0.3) - * Quaternion::rotation_y(-1.8 + movement1 * -0.8 + movement2 * 3.0) - * Quaternion::rotation_z(movement1 * -0.8 + movement2 * -0.8); + Quaternion::rotation_x(-1.0 + move1 * -0.5 + move2 * -0.3) + * Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0) + * Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8); }, Some(ToolKind::Debug) => { next.hand_l.position = Vec3::new(-7.0, 4.0, 3.0); diff --git a/voxygen/anim/src/biped_small/alpha.rs b/voxygen/anim/src/biped_small/alpha.rs index 73aa1b44bc..3d183e3bbc 100644 --- a/voxygen/anim/src/biped_small/alpha.rs +++ b/voxygen/anim/src/biped_small/alpha.rs @@ -53,27 +53,27 @@ impl Animation for AlphaAnimation { let speednorm = speed / 9.4; let speednormcancel = 1.0 - speednorm; - let (movement1base, movement2base, movement3) = match stage_section { + let (move1base, move2base, move3) = match stage_section { Some(StageSection::Buildup) => ((anim_time as f32).sqrt(), 0.0, 0.0), Some(StageSection::Swing) => (1.0, (anim_time as f32).powi(4), 0.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time as f32), _ => (0.0, 0.0, 0.0), }; - let pullback = 1.0 - movement3; - let movement1abs = movement1base * pullback; - let movement2abs = movement2base * pullback; + let pullback = 1.0 - move3; + let move1abs = move1base * pullback; + let move2abs = move2base * pullback; next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1); - next.head.orientation = Quaternion::rotation_x(movement1abs * 0.2 + movement2abs * 0.3) - * Quaternion::rotation_z(movement1abs * -0.2 + movement2abs * 0.6) - * Quaternion::rotation_y(movement1abs * 0.3 + movement2abs * -0.5); + next.head.orientation = Quaternion::rotation_x(move1abs * 0.2 + move2abs * 0.3) + * Quaternion::rotation_z(move1abs * -0.2 + move2abs * 0.6) + * Quaternion::rotation_y(move1abs * 0.3 + move2abs * -0.5); next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1) / 13.0; - next.chest.orientation = Quaternion::rotation_x(movement1abs * -0.2 + movement2abs * 0.3) - * Quaternion::rotation_z(movement1abs * 0.5 + movement2abs * -0.6); + next.chest.orientation = Quaternion::rotation_x(move1abs * -0.2 + move2abs * 0.3) + * Quaternion::rotation_z(move1abs * 0.5 + move2abs * -0.6); next.pants.position = Vec3::new(0.0, s_a.pants.0, s_a.pants.1); - next.pants.orientation = Quaternion::rotation_x(movement1abs * 0.2 + movement2abs * -0.3) - * Quaternion::rotation_z(movement1abs * -0.2 + movement2abs * 0.2); + next.pants.orientation = Quaternion::rotation_x(move1abs * 0.2 + move2abs * -0.3) + * Quaternion::rotation_z(move1abs * -0.2 + move2abs * 0.2); next.main.position = Vec3::new(0.0, 0.0, 0.0); next.main.orientation = Quaternion::rotation_x(0.0); @@ -88,22 +88,21 @@ impl Animation for AlphaAnimation { next.control_r.position = Vec3::new(-1.0 + s_a.grip.0 * 2.0, 2.0, 2.0); next.control.position = Vec3::new( - -3.0 + movement1abs * -3.0 + movement2abs * 5.0, - s_a.grip.2 + movement1abs * -12.0 + movement2abs * 17.0, - -s_a.grip.2 / 2.5 + s_a.grip.0 * -2.0 + movement2abs * 5.0, + -3.0 + move1abs * -3.0 + move2abs * 5.0, + s_a.grip.2 + move1abs * -12.0 + move2abs * 17.0, + -s_a.grip.2 / 2.5 + s_a.grip.0 * -2.0 + move2abs * 5.0, ); next.control_l.orientation = - Quaternion::rotation_x(PI / 1.5 + movement1abs * -1.5 + movement2abs * 2.5) + Quaternion::rotation_x(PI / 1.5 + move1abs * -1.5 + move2abs * 2.5) * Quaternion::rotation_y(-0.3); - next.control_r.orientation = Quaternion::rotation_x( - PI / 1.5 + s_a.grip.0 * 0.2 + movement1abs * -1.5 + movement2abs * 2.5, - ) * Quaternion::rotation_y(0.5 + s_a.grip.0 * 0.2); + next.control_r.orientation = + Quaternion::rotation_x(PI / 1.5 + s_a.grip.0 * 0.2 + move1abs * -1.5 + move2abs * 2.5) + * Quaternion::rotation_y(0.5 + s_a.grip.0 * 0.2); - next.control.orientation = - Quaternion::rotation_x(-1.35 + movement1abs * -0.3 + movement2abs * 0.5) - * Quaternion::rotation_z(movement1abs * 1.0 + movement2abs * -1.0) - * Quaternion::rotation_y(movement2abs * 0.0); + next.control.orientation = Quaternion::rotation_x(-1.35 + move1abs * -0.3 + move2abs * 0.5) + * Quaternion::rotation_z(move1abs * 1.0 + move2abs * -1.0) + * Quaternion::rotation_y(move2abs * 0.0); next.tail.position = Vec3::new(0.0, s_a.tail.0, s_a.tail.1); next.tail.orientation = Quaternion::rotation_x(0.05 * fastalt * speednormcancel) diff --git a/voxygen/anim/src/character/alpha.rs b/voxygen/anim/src/character/alpha.rs index 15b5ed6ece..b8c8e0f5c9 100644 --- a/voxygen/anim/src/character/alpha.rs +++ b/voxygen/anim/src/character/alpha.rs @@ -34,7 +34,7 @@ impl Animation for AlphaAnimation { let lab = 1.0; - let (movement1, movement2, movement3) = match stage_section { + let (move1, move2, move3) = match stage_section { Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0), Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0), Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4)), @@ -70,22 +70,19 @@ impl Animation for AlphaAnimation { next.control.position = Vec3::new( s_a.sc.0, - s_a.sc.1 + movement1 * -4.0 + movement2 * 16.0 + movement3 * -4.0, - s_a.sc.2 + movement1 * 1.0, + s_a.sc.1 + move1 * -4.0 + move2 * 16.0 + move3 * -4.0, + s_a.sc.2 + move1 * 1.0, ); - next.control.orientation = Quaternion::rotation_x(s_a.sc.3 + movement1 * -0.5) - * Quaternion::rotation_y( - s_a.sc.4 + movement1 * -1.0 + movement2 * -0.6 + movement3 * 1.0, - ) - * Quaternion::rotation_z(s_a.sc.5 + movement1 * -1.2 + movement2 * 1.3); + next.control.orientation = Quaternion::rotation_x(s_a.sc.3 + move1 * -0.5) + * Quaternion::rotation_y(s_a.sc.4 + move1 * -1.0 + move2 * -0.6 + move3 * 1.0) + * Quaternion::rotation_z(s_a.sc.5 + move1 * -1.2 + move2 * 1.3); - next.chest.orientation = Quaternion::rotation_z( - movement1 * 1.5 + (movement2 * 1.75).sin() * -3.0 + movement3 * 0.5, - ); + next.chest.orientation = + Quaternion::rotation_z(move1 * 1.5 + (move2 * 1.75).sin() * -3.0 + move3 * 0.5); - next.head.position = Vec3::new(0.0 + movement2 * 2.0, s_a.head.0, s_a.head.1); + next.head.position = Vec3::new(0.0 + move2 * 2.0, s_a.head.0, s_a.head.1); next.head.orientation = Quaternion::rotation_z( - movement1 * -0.9 + (movement2 * 1.75).sin() * 2.5 + movement3 * -0.5, + move1 * -0.9 + (move2 * 1.75).sin() * 2.5 + move3 * -0.5, ); }, Some(ToolKind::Dagger) => { @@ -104,45 +101,39 @@ impl Animation for AlphaAnimation { next.hand_r.orientation = Quaternion::rotation_x(s_a.ahr.3) * Quaternion::rotation_z(s_a.ahr.5); - next.head.position = Vec3::new( - 0. + movement2 * 2.0, - s_a.head.0 + movement2 * 2.0, - s_a.head.1, - ); + next.head.position = + Vec3::new(0. + move2 * 2.0, s_a.head.0 + move2 * 2.0, s_a.head.1); - let (movement1, movement2, movement3) = match stage_section { + let (move1, move2, move3) = match stage_section { Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0), Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0), Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4)), _ => (0.0, 0.0, 0.0), }; next.control.position = Vec3::new( - s_a.ac.0 + movement1 * -1.0 + movement2 * -2.0 + movement3 * 0.0, - s_a.ac.1 + movement1 * -3.0 + movement2 * 3.0 + movement3 * -3.5, - s_a.ac.2 + movement1 * 6.0 + movement2 * -15.0 + movement3 * -2.0, - ); - next.control.orientation = Quaternion::rotation_x( - s_a.ac.3 + movement1 * 0.0 + movement2 * -3.0 + movement3 * 0.4, - ) * Quaternion::rotation_y( - s_a.ac.4 + movement1 * -0.0 + movement2 * -0.6 + movement3 * 0.8, - ) * Quaternion::rotation_z( - s_a.ac.5 + movement1 * -2.0 + movement2 * -1.0 + movement3 * 2.5, + s_a.ac.0 + move1 * -1.0 + move2 * -2.0 + move3 * 0.0, + s_a.ac.1 + move1 * -3.0 + move2 * 3.0 + move3 * -3.5, + s_a.ac.2 + move1 * 6.0 + move2 * -15.0 + move3 * -2.0, ); + next.control.orientation = + Quaternion::rotation_x(s_a.ac.3 + move1 * 0.0 + move2 * -3.0 + move3 * 0.4) + * Quaternion::rotation_y( + s_a.ac.4 + move1 * -0.0 + move2 * -0.6 + move3 * 0.8, + ) + * Quaternion::rotation_z( + s_a.ac.5 + move1 * -2.0 + move2 * -1.0 + move3 * 2.5, + ); next.control.scale = Vec3::one(); - next.chest.orientation = Quaternion::rotation_x( - 0.0 + movement1 * 0.6 + movement2 * -0.6 + movement3 * 0.4, - ) * Quaternion::rotation_y( - 0.0 + movement1 * 0.0 + movement2 * 0.0 + movement3 * 0.0, - ) * Quaternion::rotation_z( - 0.0 + movement1 * 1.5 + movement2 * -2.5 + movement3 * 1.5, - ); - next.head.orientation = Quaternion::rotation_z( - 0.0 + movement1 * -1.5 + movement2 * 2.5 + movement3 * -1.0, - ); + next.chest.orientation = + Quaternion::rotation_x(0.0 + move1 * 0.6 + move2 * -0.6 + move3 * 0.4) + * Quaternion::rotation_y(0.0 + move1 * 0.0 + move2 * 0.0 + move3 * 0.0) + * Quaternion::rotation_z(0.0 + move1 * 1.5 + move2 * -2.5 + move3 * 1.5); + next.head.orientation = + Quaternion::rotation_z(0.0 + move1 * -1.5 + move2 * 2.5 + move3 * -1.0); }, Some(ToolKind::Hammer) => { - let (movement1, movement2, movement3) = match stage_section { + let (move1, move2, move3) = match stage_section { Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0), Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0), Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4)), @@ -150,8 +141,7 @@ impl Animation for AlphaAnimation { }; next.main.position = Vec3::new(0.0, 0.0, 0.0); next.main.orientation = Quaternion::rotation_x(0.0); - next.hand_l.position = - Vec3::new(s_a.hhl.0, s_a.hhl.1, s_a.hhl.2 + movement2 * -7.0); + next.hand_l.position = Vec3::new(s_a.hhl.0, s_a.hhl.1, s_a.hhl.2 + move2 * -7.0); next.hand_l.orientation = Quaternion::rotation_x(s_a.hhl.3) * Quaternion::rotation_y(s_a.hhl.4); next.hand_r.position = Vec3::new(s_a.hhr.0, s_a.hhr.1, s_a.hhr.2); @@ -159,34 +149,26 @@ impl Animation for AlphaAnimation { Quaternion::rotation_x(s_a.hhr.3) * Quaternion::rotation_y(s_a.hhr.4); next.control.position = Vec3::new( - s_a.hc.0 + (movement1 * -13.0) * (1.0 - movement3), - s_a.hc.1 + (movement2 * 5.0) * (1.0 - movement3), + s_a.hc.0 + (move1 * -13.0) * (1.0 - move3), + s_a.hc.1 + (move2 * 5.0) * (1.0 - move3), s_a.hc.2, ); next.control.orientation = - Quaternion::rotation_x(s_a.hc.3 + (movement1 * 1.5 + movement2 * -2.5)) - * (1.0 - movement3) - * Quaternion::rotation_y(s_a.hc.4 + (movement1 * 1.57)) - * (1.0 - movement3) - * Quaternion::rotation_z(s_a.hc.5 + (movement2 * -0.5) * (1.0 - movement3)); + Quaternion::rotation_x(s_a.hc.3 + (move1 * 1.5 + move2 * -2.5)) + * (1.0 - move3) + * Quaternion::rotation_y(s_a.hc.4 + (move1 * 1.57)) + * (1.0 - move3) + * Quaternion::rotation_z(s_a.hc.5 + (move2 * -0.5) * (1.0 - move3)); next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1); next.head.orientation = - Quaternion::rotation_x((movement1 * 0.1 + movement2 * 0.3) * (1.0 - movement3)) - * Quaternion::rotation_z( - (movement1 * -0.2 + movement2 * 0.2) * (1.0 - movement3), - ); - next.chest.position = Vec3::new( - 0.0, - s_a.chest.0, - s_a.chest.1 + movement2 * -2.0 * (1.0 - movement3), - ); - next.chest.orientation = Quaternion::rotation_x( - (movement1 * 0.4 + movement2 * -0.7) * (1.0 - movement3), - ) * Quaternion::rotation_y( - (movement1 * 0.3 + movement2 * -0.4) * (1.0 - movement3), - ) * Quaternion::rotation_z( - (movement1 * 0.5 + movement2 * -0.5) * (1.0 - movement3), - ); + Quaternion::rotation_x((move1 * 0.1 + move2 * 0.3) * (1.0 - move3)) + * Quaternion::rotation_z((move1 * -0.2 + move2 * 0.2) * (1.0 - move3)); + next.chest.position = + Vec3::new(0.0, s_a.chest.0, s_a.chest.1 + move2 * -2.0 * (1.0 - move3)); + next.chest.orientation = + Quaternion::rotation_x((move1 * 0.4 + move2 * -0.7) * (1.0 - move3)) + * Quaternion::rotation_y((move1 * 0.3 + move2 * -0.4) * (1.0 - move3)) + * Quaternion::rotation_z((move1 * 0.5 + move2 * -0.5) * (1.0 - move3)); if velocity > 0.5 { next.foot_l.position = Vec3::new(-s_a.foot.0, foot * -6.0, s_a.foot.2); @@ -207,10 +189,8 @@ impl Animation for AlphaAnimation { next.foot_r.orientation = Quaternion::rotation_x(slower * 0.1) * Quaternion::rotation_z((slower * 0.5).max(0.0)); - next.belt.orientation = - Quaternion::rotation_x(movement1 * -0.2 + movement2 * 0.2); - next.shorts.orientation = - Quaternion::rotation_x(movement1 * -0.3 + movement2 * 0.3); + next.belt.orientation = Quaternion::rotation_x(move1 * -0.2 + move2 * 0.2); + next.shorts.orientation = Quaternion::rotation_x(move1 * -0.3 + move2 * 0.3); } }, Some(ToolKind::Debug) => { diff --git a/voxygen/anim/src/character/beam.rs b/voxygen/anim/src/character/beam.rs index e4015c7131..14a1904f5f 100644 --- a/voxygen/anim/src/character/beam.rs +++ b/voxygen/anim/src/character/beam.rs @@ -32,7 +32,7 @@ impl Animation for BeamAnimation { *rate = 1.0; let mut next = (*skeleton).clone(); - let (movement1, movement2, movement3) = match stage_section { + let (move1, move2, move3) = match stage_section { Some(StageSection::Buildup) => (anim_time as f32, 0.0, 0.0), Some(StageSection::Cast) => (1.0, anim_time as f32, 0.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time as f32), @@ -56,59 +56,53 @@ impl Animation for BeamAnimation { match active_tool_kind { Some(ToolKind::Staff) | Some(ToolKind::Sceptre) => { next.control.position = Vec3::new( - s_a.stc.0 + (movement1 * 16.0) * (1.0 - movement3), - s_a.stc.1 + (movement1 + (movement2 * 8.0).sin() * 2.0) * (1.0 - movement3), - s_a.stc.2 + (movement1 * 10.0) * (1.0 - movement3), + s_a.stc.0 + (move1 * 16.0) * (1.0 - move3), + s_a.stc.1 + (move1 + (move2 * 8.0).sin() * 2.0) * (1.0 - move3), + s_a.stc.2 + (move1 * 10.0) * (1.0 - move3), ); next.control.orientation = - Quaternion::rotation_x(s_a.stc.3 + (movement1 * -1.2) * (1.0 - movement3)) + Quaternion::rotation_x(s_a.stc.3 + (move1 * -1.2) * (1.0 - move3)) * Quaternion::rotation_y( s_a.stc.4 - + (movement1 * -1.4 + (movement2 * 16.0).sin() * 0.07) - * (1.0 - movement3), + + (move1 * -1.4 + (move2 * 16.0).sin() * 0.07) * (1.0 - move3), ) * Quaternion::rotation_z( - (movement1 * -1.7 + (movement2 * 8.0 + PI / 4.0).sin() * 0.3) - * (1.0 - movement3), + (move1 * -1.7 + (move2 * 8.0 + PI / 4.0).sin() * 0.3) * (1.0 - move3), ); next.head.orientation = Quaternion::rotation_x(0.0); next.hand_l.position = Vec3::new( - 0.0 + (movement1 * -1.0 + (movement2 * 8.0).sin() * 3.5) * (1.0 - movement3), - 0.0 + (movement1 * -5.0 - + (movement2 * 8.0).sin() * -2.0 - + (movement2 * 16.0).sin() * -1.5) - * (1.0 - movement3), - -4.0 + (movement1 * 19.0 + (movement2 * 8.0 + PI / 2.0).sin() * 3.5) - * (1.0 - movement3), + 0.0 + (move1 * -1.0 + (move2 * 8.0).sin() * 3.5) * (1.0 - move3), + 0.0 + (move1 * -5.0 + (move2 * 8.0).sin() * -2.0 + (move2 * 16.0).sin() * -1.5) + * (1.0 - move3), + -4.0 + (move1 * 19.0 + (move2 * 8.0 + PI / 2.0).sin() * 3.5) * (1.0 - move3), ); next.hand_l.orientation = - Quaternion::rotation_x(s_a.sthr.3 + (movement1 * -0.3) * (1.0 - movement3)) + Quaternion::rotation_x(s_a.sthr.3 + (move1 * -0.3) * (1.0 - move3)) * Quaternion::rotation_y( - (movement1 * -1.1 + (movement2 * 8.0 + PI / 2.0).sin() * -0.3) - * (1.0 - movement3), + (move1 * -1.1 + (move2 * 8.0 + PI / 2.0).sin() * -0.3) * (1.0 - move3), ) - * Quaternion::rotation_z((movement1 * -2.8) * (1.0 - movement3)); + * Quaternion::rotation_z((move1 * -2.8) * (1.0 - move3)); if velocity < 0.5 { next.head.orientation = - Quaternion::rotation_z(movement1 * -0.5 + (movement2 * 16.0).sin() * 0.05); + Quaternion::rotation_z(move1 * -0.5 + (move2 * 16.0).sin() * 0.05); next.foot_l.position = - Vec3::new(-s_a.foot.0, s_a.foot.1 + movement1 * -3.0, s_a.foot.2); - next.foot_l.orientation = Quaternion::rotation_x(movement1 * -0.5) - * Quaternion::rotation_z(movement1 * 0.5); + Vec3::new(-s_a.foot.0, s_a.foot.1 + move1 * -3.0, s_a.foot.2); + next.foot_l.orientation = + Quaternion::rotation_x(move1 * -0.5) * Quaternion::rotation_z(move1 * 0.5); next.foot_r.position = - Vec3::new(s_a.foot.0, s_a.foot.1 + movement1 * 4.0, s_a.foot.2); - next.foot_r.orientation = Quaternion::rotation_z(movement1 * 0.5); + Vec3::new(s_a.foot.0, s_a.foot.1 + move1 * 4.0, s_a.foot.2); + next.foot_r.orientation = Quaternion::rotation_z(move1 * 0.5); next.chest.orientation = - Quaternion::rotation_x(movement1 * -0.2 + (movement2 * 8.0).sin() * 0.05) - * Quaternion::rotation_z(movement1 * 0.5); - next.belt.orientation = Quaternion::rotation_x(movement1 * 0.1) - * Quaternion::rotation_z(movement1 * -0.1); - next.shorts.orientation = Quaternion::rotation_x(movement1 * 0.2) - * Quaternion::rotation_z(movement1 * -0.2); + Quaternion::rotation_x(move1 * -0.2 + (move2 * 8.0).sin() * 0.05) + * Quaternion::rotation_z(move1 * 0.5); + next.belt.orientation = + Quaternion::rotation_x(move1 * 0.1) * Quaternion::rotation_z(move1 * -0.1); + next.shorts.orientation = + Quaternion::rotation_x(move1 * 0.2) * Quaternion::rotation_z(move1 * -0.2); } else { }; }, diff --git a/voxygen/anim/src/character/beta.rs b/voxygen/anim/src/character/beta.rs index 7255a22667..ba42293d1f 100644 --- a/voxygen/anim/src/character/beta.rs +++ b/voxygen/anim/src/character/beta.rs @@ -30,7 +30,7 @@ impl Animation for BetaAnimation { *rate = 1.0; let mut next = (*skeleton).clone(); - let (movement1, movement2, movement3) = match stage_section { + let (move1, move2, move3) = match stage_section { Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0), Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0), Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4)), @@ -48,21 +48,17 @@ impl Animation for BetaAnimation { Quaternion::rotation_x(s_a.shr.3) * Quaternion::rotation_y(s_a.shr.4); next.control.position = Vec3::new( - s_a.sc.0 + (-1.4 + movement1 * -3.0 + movement2 * -2.0) * (1.0 - movement3), - s_a.sc.1 + (-1.4 + movement1 * 3.0 + movement2 * 3.0) * (1.0 - movement3), - s_a.sc.2 + (-1.9 + movement1 * 2.5 * (1.0 - movement3)), + s_a.sc.0 + (-1.4 + move1 * -3.0 + move2 * -2.0) * (1.0 - move3), + s_a.sc.1 + (-1.4 + move1 * 3.0 + move2 * 3.0) * (1.0 - move3), + s_a.sc.2 + (-1.9 + move1 * 2.5 * (1.0 - move3)), ); - next.control.orientation = Quaternion::rotation_x(s_a.sc.3 + (-1.7) * (1.0 - movement3)) - * Quaternion::rotation_y( - s_a.sc.4 + (0.4 + movement1 * 1.5 + movement2 * -2.5) * (1.0 - movement3), - ) - * Quaternion::rotation_z(s_a.sc.5 + (1.67 + movement2 * 1.57) * (1.0 - movement3)); + next.control.orientation = Quaternion::rotation_x(s_a.sc.3 + (-1.7) * (1.0 - move3)) + * Quaternion::rotation_y(s_a.sc.4 + (0.4 + move1 * 1.5 + move2 * -2.5) * (1.0 - move3)) + * Quaternion::rotation_z(s_a.sc.5 + (1.67 + move2 * 1.57) * (1.0 - move3)); next.chest.orientation = Quaternion::rotation_x(0.15) - * Quaternion::rotation_y((-0.1) * (1.0 - movement3)) - * Quaternion::rotation_z( - (0.4 + movement1 * 1.5 + movement2 * -2.5) * (1.0 - movement3), - ); - next.head.orientation = Quaternion::rotation_z((-0.4) * (1.0 - movement3)); + * Quaternion::rotation_y((-0.1) * (1.0 - move3)) + * Quaternion::rotation_z((0.4 + move1 * 1.5 + move2 * -2.5) * (1.0 - move3)); + next.head.orientation = Quaternion::rotation_z((-0.4) * (1.0 - move3)); next } diff --git a/voxygen/anim/src/character/charge.rs b/voxygen/anim/src/character/charge.rs deleted file mode 100644 index a64285ca9e..0000000000 --- a/voxygen/anim/src/character/charge.rs +++ /dev/null @@ -1,164 +0,0 @@ -use super::{ - super::{vek::*, Animation}, - CharacterSkeleton, SkeletonAttr, -}; -use common::comp::item::ToolKind; - -pub struct ChargeAnimation; - -impl Animation for ChargeAnimation { - type Dependency = ( - Option, - Option, - f32, - Vec3, - Vec3, - f64, - ); - type Skeleton = CharacterSkeleton; - - #[cfg(feature = "use-dyn-lib")] - const UPDATE_FN: &'static [u8] = b"character_charge\0"; - - #[cfg_attr(feature = "be-dyn-lib", export_name = "character_charge")] - #[allow(clippy::approx_constant)] // TODO: Pending review in #587 - - fn update_skeleton_inner( - skeleton: &Self::Skeleton, - (active_tool_kind, _second_tool_kind, velocity, orientation, last_ori, _global_time): Self::Dependency, - anim_time: f64, - rate: &mut f32, - s_a: &SkeletonAttr, - ) -> Self::Skeleton { - *rate = 1.0; - - let mut next = (*skeleton).clone(); - - let lab = 1.0; - - let foot = (((5.0) / (0.2 + 4.8 * ((anim_time as f32 * lab as f32 * 8.0).sin()).powi(2))) - .sqrt()) - * ((anim_time as f32 * lab as f32 * 8.0).sin()); - let foote = (((5.0) - / (0.5 + 4.5 * ((anim_time as f32 * lab as f32 * 8.0 + 1.57).sin()).powi(2))) - .sqrt()) - * ((anim_time as f32 * lab as f32 * 8.0).sin()); - let stress = - (((5.0) / (0.5 + 4.5 * ((anim_time as f32 * lab as f32 * 20.0).cos()).powi(2))).sqrt()) - * ((anim_time as f32 * lab as f32 * 20.0).cos()); - let quick = (((5.0) / (3.5 + 1.5 * ((anim_time as f32 * lab as f32 * 8.0).sin()).powi(2))) - .sqrt()) - * ((anim_time as f32 * lab as f32 * 8.0).sin()); - let stop = ((anim_time as f32).powf(0.3)).min(1.2); - let stopa = ((anim_time as f32).powf(0.9)).min(5.0); - - let ori: Vec2 = Vec2::from(orientation); - let last_ori = Vec2::from(last_ori); - let tilt = if ::vek::Vec2::new(ori, last_ori) - .map(|o| o.magnitude_squared()) - .map(|m| m > 0.001 && m.is_finite()) - .reduce_and() - && ori.angle_between(last_ori).is_finite() - { - ori.angle_between(last_ori).min(0.2) - * last_ori.determine_side(Vec2::zero(), ori).signum() - } else { - 0.0 - } * 1.3; - - next.head.position = Vec3::new(stop * -2.0, -1.5 + stop * 2.5 + s_a.head.0, s_a.head.1); - next.head.orientation = - Quaternion::rotation_z(stop * -1.0 + tilt * -2.0) * Quaternion::rotation_y(stop * -0.3); - next.head.scale = Vec3::one() * s_a.head_scale; - - next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1); - next.chest.orientation = - Quaternion::rotation_z(stop * 1.2 + stress * stop * 0.02 + tilt * -2.0); - - next.belt.position = Vec3::new(0.0, s_a.belt.0, s_a.belt.1); - next.belt.orientation = Quaternion::rotation_z(stop * -0.5 + tilt * 2.0); - - next.shorts.position = Vec3::new(0.0, s_a.shorts.0, s_a.shorts.1); - next.shorts.orientation = Quaternion::rotation_z(stop * -0.7 + tilt * 4.0); - - match active_tool_kind { - Some(ToolKind::Staff) | Some(ToolKind::Sceptre) => { - next.hand_l.position = Vec3::new(s_a.sthl.0, s_a.sthl.1, s_a.sthl.2); - next.hand_l.orientation = Quaternion::rotation_x(s_a.sthl.3); - - next.hand_r.position = Vec3::new(s_a.sthr.0, s_a.sthr.1, s_a.sthr.2); - next.hand_r.orientation = - Quaternion::rotation_x(s_a.sthr.3) * Quaternion::rotation_y(s_a.sthr.4); - - next.main.position = Vec3::new(0.0, 0.0, 0.0); - next.main.orientation = Quaternion::rotation_y(0.0); - - next.control.position = Vec3::new( - s_a.stc.0 + quick * 3.5 * (1.0 / (stopa + 0.1)), - s_a.stc.1, - s_a.stc.2 - stop * 3.0, - ); - next.control.orientation = Quaternion::rotation_x(s_a.stc.3 + stop * -0.2) - * Quaternion::rotation_y(s_a.stc.4) - * Quaternion::rotation_z(s_a.stc.5 + stop * 0.2); - }, - Some(ToolKind::Bow) => { - next.main.position = Vec3::new(0.0, 0.0, 0.0); - next.main.orientation = Quaternion::rotation_x(0.0); - next.hand_l.position = Vec3::new(s_a.bhl.0, s_a.bhl.1, s_a.bhl.2); - next.hand_l.orientation = Quaternion::rotation_x(s_a.bhl.3); - next.hand_r.position = Vec3::new(s_a.bhr.0, s_a.bhr.1, s_a.bhr.2); - next.hand_r.orientation = Quaternion::rotation_x(s_a.bhr.3); - - next.hold.position = Vec3::new(0.0, -1.0, -5.2); - next.hold.orientation = Quaternion::rotation_x(-1.57); - next.hold.scale = Vec3::one() * 1.0; - - next.control.position = Vec3::new( - 3.0 + s_a.bc.0 + stop * 13.0, - -5.0 + s_a.bc.1 + stop * 4.0, - 6.0 + s_a.bc.2, - ); - next.control.orientation = Quaternion::rotation_x(0.2 + s_a.bc.3) - * Quaternion::rotation_y(-0.8 + s_a.bc.4 + stop * -0.4) - * Quaternion::rotation_z(s_a.bc.5 + stop * -0.6); - }, - _ => {}, - } - - if velocity > 0.2 { - next.foot_l.position = Vec3::new( - -s_a.foot.0 - foot * 1.5, - s_a.foot.1 + foote * 2.0, - s_a.foot.2, - ); - next.foot_l.orientation = Quaternion::rotation_x(foote * -0.1) - * Quaternion::rotation_z(0.4) - * Quaternion::rotation_y(0.15); - - next.foot_r.position = Vec3::new( - s_a.foot.0 + foot * 1.5, - s_a.foot.1 + foote * -1.5, - s_a.foot.2, - ); - next.foot_r.orientation = Quaternion::rotation_z(0.4); - } else { - next.foot_l.position = Vec3::new( - -s_a.foot.0, - -2.5 + stop * -1.3, - s_a.foot.2 + tilt * -4.0 * foot, - ); - next.foot_l.orientation = - Quaternion::rotation_x(stop * -0.2 - 0.2 + stop * stress * 0.02) - * Quaternion::rotation_z(stop * 0.1) - * Quaternion::rotation_y(stop * 0.08); - - next.foot_r.position = - Vec3::new(s_a.foot.0, 3.5 + stop * 1.5, s_a.foot.2 + tilt * 4.0 * foot); - next.foot_r.orientation = - Quaternion::rotation_x(stop * 0.1) * Quaternion::rotation_z(stop * 0.1); - } - - next - } -} diff --git a/voxygen/anim/src/character/chargeswing.rs b/voxygen/anim/src/character/chargeswing.rs index 847bdbaf64..2af043041e 100644 --- a/voxygen/anim/src/character/chargeswing.rs +++ b/voxygen/anim/src/character/chargeswing.rs @@ -37,7 +37,7 @@ impl Animation for ChargeswingAnimation { * ((anim_time as f32 * lab as f32 * 8.0).sin()); // end spin stuff - let (movement1, movement2, movement3, tension) = match stage_section { + let (move1, move2, move3, tension) = match stage_section { Some(StageSection::Charge) => ( (anim_time as f32).min(1.0), 0.0, @@ -54,7 +54,7 @@ impl Animation for ChargeswingAnimation { next.hand_l.position = Vec3::new( s_a.hhl.0, s_a.hhl.1, - s_a.hhl.2 + (movement2 * -8.0) * (1.0 - movement3), + s_a.hhl.2 + (move2 * -8.0) * (1.0 - move3), ); next.hand_l.orientation = Quaternion::rotation_x(s_a.hhl.3) * Quaternion::rotation_y(s_a.hhl.4); @@ -63,27 +63,26 @@ impl Animation for ChargeswingAnimation { Quaternion::rotation_x(s_a.hhr.3) * Quaternion::rotation_y(s_a.hhr.4); next.control.position = Vec3::new( - s_a.hc.0 + (movement1 * -2.0 + movement2 * -3.0) * (1.0 - movement3), - s_a.hc.1 + (movement1 * 2.0 + movement2 * 3.0) * (1.0 - movement3), - s_a.hc.2 + (movement1 * 2.0 + movement2 * 4.0) * (1.0 - movement3), - ); - next.control.orientation = Quaternion::rotation_x(s_a.hc.3+(movement2*4.0)*(1.0-movement3)) - * Quaternion::rotation_y(s_a.hc.4+(tension*0.08+movement1 * 0.7+movement2*-3.5)*(1.0-movement3))//+fire * 0.1 - * Quaternion::rotation_z(s_a.hc.5+(movement1 * 0.2+movement2*-0.5)*(1.0-movement3)); - next.chest.orientation = Quaternion::rotation_z( - short * 0.04 + (movement1 * 2.0 + movement2 * -2.5) * (1.0 - movement3), + s_a.hc.0 + (move1 * -2.0 + move2 * -3.0) * (1.0 - move3), + s_a.hc.1 + (move1 * 2.0 + move2 * 3.0) * (1.0 - move3), + s_a.hc.2 + (move1 * 2.0 + move2 * 4.0) * (1.0 - move3), ); + next.control.orientation = Quaternion::rotation_x(s_a.hc.3+(move2*4.0)*(1.0-move3)) + * Quaternion::rotation_y(s_a.hc.4+(tension*0.08+move1 * 0.7+move2*-3.5)*(1.0-move3))//+fire * 0.1 + * Quaternion::rotation_z(s_a.hc.5+(move1 * 0.2+move2*-0.5)*(1.0-move3)); + next.chest.orientation = + Quaternion::rotation_z(short * 0.04 + (move1 * 2.0 + move2 * -2.5) * (1.0 - move3)); next.belt.orientation = - Quaternion::rotation_z(short * 0.08 + (movement1 * -1.0) * (1.0 - movement3)); + Quaternion::rotation_z(short * 0.08 + (move1 * -1.0) * (1.0 - move3)); next.shorts.orientation = - Quaternion::rotation_z(short * 0.15 + (movement1 * -1.0) * (1.0 - movement3)); + Quaternion::rotation_z(short * 0.15 + (move1 * -1.0) * (1.0 - move3)); next.head.position = Vec3::new( - 0.0 + (movement1 * -1.0 + movement2 * 2.0) * (1.0 - movement3), - s_a.head.0 + (movement1 * 1.0) * (1.0 - movement3), + 0.0 + (move1 * -1.0 + move2 * 2.0) * (1.0 - move3), + s_a.head.0 + (move1 * 1.0) * (1.0 - move3), s_a.head.1, ); next.head.orientation = - Quaternion::rotation_z((movement1 * -1.5 + movement2 * 2.2) * (1.0 - movement3)); + Quaternion::rotation_z((move1 * -1.5 + move2 * 2.2) * (1.0 - move3)); next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1); } next diff --git a/voxygen/anim/src/character/leapmelee.rs b/voxygen/anim/src/character/leapmelee.rs index 89fc320472..a07fb06b75 100644 --- a/voxygen/anim/src/character/leapmelee.rs +++ b/voxygen/anim/src/character/leapmelee.rs @@ -31,7 +31,7 @@ impl Animation for LeapAnimation { *rate = 1.0; let mut next = (*skeleton).clone(); - let (movement1, movement2, movement3, movement4) = match stage_section { + let (move1, move2, move3, move4) = match stage_section { Some(StageSection::Buildup) => (anim_time as f32, 0.0, 0.0, 0.0), Some(StageSection::Movement) => (1.0, (anim_time as f32).powf(0.25), 0.0, 0.0), Some(StageSection::Swing) => (1.0, 1.0, (anim_time as f32).powf(0.25), 0.0), @@ -50,38 +50,37 @@ impl Animation for LeapAnimation { next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1); next.control.position = Vec3::new( - s_a.hc.0 + movement2 * -10.0 + movement3 * 6.0, - s_a.hc.1 + movement2 * 5.0 + movement3 * 7.0, - s_a.hc.2 + movement2 * 5.0 + movement3 * -10.0, + s_a.hc.0 + move2 * -10.0 + move3 * 6.0, + s_a.hc.1 + move2 * 5.0 + move3 * 7.0, + s_a.hc.2 + move2 * 5.0 + move3 * -10.0, ); next.control.orientation = - Quaternion::rotation_x(s_a.hc.3 + movement2 * 1.57 + movement3 * -2.3) - * Quaternion::rotation_y(s_a.hc.4 + movement2 * 1.3) - * Quaternion::rotation_z(s_a.hc.5 + movement2 * -1.0 + movement3 * 0.5); + Quaternion::rotation_x(s_a.hc.3 + move2 * 1.57 + move3 * -2.3) + * Quaternion::rotation_y(s_a.hc.4 + move2 * 1.3) + * Quaternion::rotation_z(s_a.hc.5 + move2 * -1.0 + move3 * 0.5); next.chest.orientation = - Quaternion::rotation_x( - movement1 * 0.3 + movement2 * 0.3 + movement3 * -0.9 + movement4 * 0.3, - ) * Quaternion::rotation_z(movement1 * 0.5 + movement2 * 0.2 + movement3 * -0.7); + Quaternion::rotation_x(move1 * 0.3 + move2 * 0.3 + move3 * -0.9 + move4 * 0.3) + * Quaternion::rotation_z(move1 * 0.5 + move2 * 0.2 + move3 * -0.7); - next.head.orientation = Quaternion::rotation_x(movement3 * 0.2) - * Quaternion::rotation_y(0.0 + movement2 * -0.1) - * Quaternion::rotation_z(movement1 * -0.4 + movement2 * -0.2 + movement3 * 0.6); + next.head.orientation = Quaternion::rotation_x(move3 * 0.2) + * Quaternion::rotation_y(0.0 + move2 * -0.1) + * Quaternion::rotation_z(move1 * -0.4 + move2 * -0.2 + move3 * 0.6); - //next.hand_l.position = Vec3::new(-12.0 + movement3 * 10.0, 0.0, 0.0); + //next.hand_l.position = Vec3::new(-12.0 + move3 * 10.0, 0.0, 0.0); next.foot_l.position = Vec3::new( -s_a.foot.0, - s_a.foot.1 + movement3 * 13.0, - s_a.foot.2 + movement3 * -2.0, + s_a.foot.1 + move3 * 13.0, + s_a.foot.2 + move3 * -2.0, ); - next.foot_l.orientation = Quaternion::rotation_x(-0.8 + movement3 * 1.7); + next.foot_l.orientation = Quaternion::rotation_x(-0.8 + move3 * 1.7); next.foot_r.position = Vec3::new( s_a.foot.0, - s_a.foot.1 + 8.0 + movement3 * -13.0, - s_a.foot.2 + 5.0 + movement3 * -5.0, + s_a.foot.1 + 8.0 + move3 * -13.0, + s_a.foot.2 + 5.0 + move3 * -5.0, ); - next.foot_r.orientation = Quaternion::rotation_x(0.9 + movement3 * -1.7); + next.foot_r.orientation = Quaternion::rotation_x(0.9 + move3 * -1.7); } else if let Some(ToolKind::Axe) = active_tool_kind { next.hand_l.position = Vec3::new(s_a.ahl.0, s_a.ahl.1, s_a.ahl.2); next.hand_l.orientation = Quaternion::rotation_x(s_a.ahl.3); @@ -93,45 +92,42 @@ impl Animation for LeapAnimation { next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1); next.control.position = Vec3::new( - s_a.ac.0 + movement1 * 8.0, - s_a.ac.1 + movement1 * 4.0 + movement3 * 3.0, - s_a.ac.2 + movement1 * 6.0 + movement2 * 1.0 + movement3 * -14.0, + s_a.ac.0 + move1 * 8.0, + s_a.ac.1 + move1 * 4.0 + move3 * 3.0, + s_a.ac.2 + move1 * 6.0 + move2 * 1.0 + move3 * -14.0, ); next.control.orientation = Quaternion::rotation_x( - s_a.ac.3 + movement1 * -2.0 + movement2 * 0.7 + movement3 * -2.3 - ) * Quaternion::rotation_y(s_a.ac.4)// + movement1 * 0.5) - * Quaternion::rotation_z(s_a.ac.5+movement1*PI); // - movement1 * 0.2); + s_a.ac.3 + move1 * -2.0 + move2 * 0.7 + move3 * -2.3 + ) * Quaternion::rotation_y(s_a.ac.4)// + move1 * 0.5) + * Quaternion::rotation_z(s_a.ac.5+move1*PI); // - move1 * 0.2); next.torso.orientation = Quaternion::rotation_x( - -0.3 + movement2 * -1.6 * PI - + movement2 * -0.3 - + movement3 * -0.2 * PI - + movement4 * -0.1 * PI, + -0.3 + move2 * -1.6 * PI + move2 * -0.3 + move3 * -0.2 * PI + move4 * -0.1 * PI, ) * Quaternion::rotation_y(0.0) * Quaternion::rotation_z(0.0); next.head.orientation = - Quaternion::rotation_x(0.0 + movement1 * -0.4 + movement2 * 0.4 + movement3 * 0.2); + Quaternion::rotation_x(0.0 + move1 * -0.4 + move2 * 0.4 + move3 * 0.2); next.foot_l.position = Vec3::new( -s_a.foot.0, - s_a.foot.1 + movement2 * 4.0 + movement3 * -1.0, + s_a.foot.1 + move2 * 4.0 + move3 * -1.0, s_a.foot.2, ); next.foot_r.position = Vec3::new( s_a.foot.0, - s_a.foot.1 + movement2 * 4.0 + movement3 * -8.0, - s_a.foot.2 + movement3 * -3.0, + s_a.foot.1 + move2 * 4.0 + move3 * -8.0, + s_a.foot.2 + move3 * -3.0, ); next.foot_l.orientation = - Quaternion::rotation_x(movement1 * 0.9 - movement2 * 1.0 + movement3 * 1.8); + Quaternion::rotation_x(move1 * 0.9 - move2 * 1.0 + move3 * 1.8); - next.foot_r.orientation = Quaternion::rotation_x(movement1 * 0.9 - movement3 * 1.8); + next.foot_r.orientation = Quaternion::rotation_x(move1 * 0.9 - move3 * 1.8); - next.belt.orientation = Quaternion::rotation_x(movement1 * 0.22 + movement2 * 0.1); - next.shorts.orientation = Quaternion::rotation_x(movement1 * 0.3 + movement2 * 0.1); + next.belt.orientation = Quaternion::rotation_x(move1 * 0.22 + move2 * 0.1); + next.shorts.orientation = Quaternion::rotation_x(move1 * 0.3 + move2 * 0.1); next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1); } diff --git a/voxygen/anim/src/character/mod.rs b/voxygen/anim/src/character/mod.rs index c43b068fed..36e2cae0c4 100644 --- a/voxygen/anim/src/character/mod.rs +++ b/voxygen/anim/src/character/mod.rs @@ -2,7 +2,6 @@ pub mod alpha; pub mod beam; pub mod beta; pub mod block; -pub mod charge; pub mod chargeswing; pub mod climb; pub mod dance; @@ -33,14 +32,14 @@ pub mod wield; // Reexports pub use self::{ alpha::AlphaAnimation, beam::BeamAnimation, beta::BetaAnimation, block::BlockAnimation, - charge::ChargeAnimation, chargeswing::ChargeswingAnimation, climb::ClimbAnimation, - dance::DanceAnimation, dash::DashAnimation, equip::EquipAnimation, - glidewield::GlideWieldAnimation, gliding::GlidingAnimation, idle::IdleAnimation, - jump::JumpAnimation, leapmelee::LeapAnimation, repeater::RepeaterAnimation, - roll::RollAnimation, run::RunAnimation, shockwave::ShockwaveAnimation, shoot::ShootAnimation, - sit::SitAnimation, sneak::SneakAnimation, spin::SpinAnimation, spinmelee::SpinMeleeAnimation, - staggered::StaggeredAnimation, stand::StandAnimation, stunned::StunnedAnimation, - swim::SwimAnimation, swimwield::SwimWieldAnimation, talk::TalkAnimation, wield::WieldAnimation, + chargeswing::ChargeswingAnimation, climb::ClimbAnimation, dance::DanceAnimation, + dash::DashAnimation, equip::EquipAnimation, glidewield::GlideWieldAnimation, + gliding::GlidingAnimation, idle::IdleAnimation, jump::JumpAnimation, leapmelee::LeapAnimation, + repeater::RepeaterAnimation, roll::RollAnimation, run::RunAnimation, + shockwave::ShockwaveAnimation, shoot::ShootAnimation, sit::SitAnimation, sneak::SneakAnimation, + spin::SpinAnimation, spinmelee::SpinMeleeAnimation, staggered::StaggeredAnimation, + stand::StandAnimation, stunned::StunnedAnimation, swim::SwimAnimation, + swimwield::SwimWieldAnimation, talk::TalkAnimation, wield::WieldAnimation, }; use super::{make_bone, vek::*, FigureBoneData, Skeleton}; use common::comp; diff --git a/voxygen/anim/src/character/repeater.rs b/voxygen/anim/src/character/repeater.rs index bf6d204d0a..75583139ac 100644 --- a/voxygen/anim/src/character/repeater.rs +++ b/voxygen/anim/src/character/repeater.rs @@ -30,7 +30,7 @@ impl Animation for RepeaterAnimation { *rate = 1.0; let mut next = (*skeleton).clone(); - let (movement1, movement2, movement3, _movement4) = match stage_section { + let (move1, move2, move3, _move4) = match stage_section { Some(StageSection::Movement) => (anim_time as f32, 0.0, 0.0, 0.0), Some(StageSection::Buildup) => (1.0, anim_time as f32, 0.0, 0.0), Some(StageSection::Shoot) => (1.0, 1.0, anim_time as f32, 0.0), @@ -52,48 +52,43 @@ impl Animation for RepeaterAnimation { next.hold.position = Vec3::new(1.2, -1.0, -5.2); next.hold.orientation = Quaternion::rotation_x(-1.7) * Quaternion::rotation_z(-0.1); - next.hold.scale = Vec3::one() * 1.0 * (1.0 - movement3); + next.hold.scale = Vec3::one() * 1.0 * (1.0 - move3); next.foot_l.position = Vec3::new( - -s_a.foot.0 + movement1 * -0.75 - 0.75, - s_a.foot.1 + movement1 * 4.0 + 4.0, - s_a.foot.2 + movement1 * 2.5 + 2.5, + -s_a.foot.0 + move1 * -0.75 - 0.75, + s_a.foot.1 + move1 * 4.0 + 4.0, + s_a.foot.2 + move1 * 2.5 + 2.5, ); - next.foot_l.orientation = - Quaternion::rotation_x(movement1 * 0.6 + 0.6 + movement2 * -0.2) - * Quaternion::rotation_z(movement1 * 0.3 + 0.3); + next.foot_l.orientation = Quaternion::rotation_x(move1 * 0.6 + 0.6 + move2 * -0.2) + * Quaternion::rotation_z(move1 * 0.3 + 0.3); next.foot_r.position = Vec3::new( - s_a.foot.0 + movement1 * 0.75 + 0.75, - s_a.foot.1 + movement1 * 4.0 + 4.0, - s_a.foot.2 + movement1 * 2.5 + 2.5, + s_a.foot.0 + move1 * 0.75 + 0.75, + s_a.foot.1 + move1 * 4.0 + 4.0, + s_a.foot.2 + move1 * 2.5 + 2.5, ); - next.foot_r.orientation = - Quaternion::rotation_x(movement1 * 0.6 + 0.6 + movement2 * -0.2) - * Quaternion::rotation_z(movement1 * -0.3 - 0.3); - next.shorts.position = Vec3::new( - 0.0, - s_a.shorts.0 + movement1 * 4.0, - s_a.shorts.1 + movement1 * 1.0, - ); - next.shorts.orientation = Quaternion::rotation_x(movement1 * 0.6); - next.belt.position = Vec3::new(0.0, s_a.belt.0 + movement1 * 2.0, s_a.belt.1); - next.belt.orientation = Quaternion::rotation_x(movement1 * 0.2); + next.foot_r.orientation = Quaternion::rotation_x(move1 * 0.6 + 0.6 + move2 * -0.2) + * Quaternion::rotation_z(move1 * -0.3 - 0.3); + next.shorts.position = + Vec3::new(0.0, s_a.shorts.0 + move1 * 4.0, s_a.shorts.1 + move1 * 1.0); + next.shorts.orientation = Quaternion::rotation_x(move1 * 0.6); + next.belt.position = Vec3::new(0.0, s_a.belt.0 + move1 * 2.0, s_a.belt.1); + next.belt.orientation = Quaternion::rotation_x(move1 * 0.2); next.control.position = Vec3::new( - s_a.bc.0 + movement1 * 5.0, - s_a.bc.1 + movement1 * 3.0, - s_a.bc.2 + movement1 * 1.0, + s_a.bc.0 + move1 * 5.0, + s_a.bc.1 + move1 * 3.0, + s_a.bc.2 + move1 * 1.0, ); - next.control.orientation = Quaternion::rotation_x(s_a.bc.3 + movement1 * 0.4) - * Quaternion::rotation_y(s_a.bc.4 + movement1 * 0.8) + next.control.orientation = Quaternion::rotation_x(s_a.bc.3 + move1 * 0.4) + * Quaternion::rotation_y(s_a.bc.4 + move1 * 0.8) * Quaternion::rotation_z(s_a.bc.5); - next.head.orientation = Quaternion::rotation_y(movement1 * 0.15 + movement2 * 0.05); + next.head.orientation = Quaternion::rotation_y(move1 * 0.15 + move2 * 0.05); next.torso.orientation = - Quaternion::rotation_x(movement1 * 0.1 + movement2 * 0.1 + movement3 * 0.15); + Quaternion::rotation_x(move1 * 0.1 + move2 * 0.1 + move3 * 0.15); next.hand_l.position = Vec3::new( - 2.0 + fire(movement3) * -6.0 - 3.0, - 1.5 + fire(movement3) * -6.0 - 3.0, + 2.0 + fire(move3) * -6.0 - 3.0, + 1.5 + fire(move3) * -6.0 - 3.0, 0.0, ); next.hand_l.orientation = Quaternion::rotation_x(1.20) diff --git a/voxygen/anim/src/character/shockwave.rs b/voxygen/anim/src/character/shockwave.rs index 22569a62da..e8dd676d3b 100644 --- a/voxygen/anim/src/character/shockwave.rs +++ b/voxygen/anim/src/character/shockwave.rs @@ -34,7 +34,7 @@ impl Animation for ShockwaveAnimation { *rate = 1.0; let mut next = (*skeleton).clone(); - let (movement1, movement2, movement3) = match stage_section { + let (move1, move2, move3) = match stage_section { Some(StageSection::Buildup) => (anim_time as f32, 0.0, 0.0), Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time as f32), @@ -56,53 +56,53 @@ impl Animation for ShockwaveAnimation { next.control.orientation = Quaternion::rotation_x(s_a.stc.3) * Quaternion::rotation_y(s_a.stc.4); - let twist = movement1 * 0.8; + let twist = move1 * 0.8; next.control.position = Vec3::new( - s_a.stc.0 + (movement1 * 5.0) * (1.0 - movement3), - s_a.stc.1 + (movement1 * 5.0) * (1.0 - movement3), - s_a.stc.2 + (movement1 * 10.0 + movement2 * -10.0) * (1.0 - movement3), + s_a.stc.0 + (move1 * 5.0) * (1.0 - move3), + s_a.stc.1 + (move1 * 5.0) * (1.0 - move3), + s_a.stc.2 + (move1 * 10.0 + move2 * -10.0) * (1.0 - move3), ); next.control.orientation = - Quaternion::rotation_x(s_a.stc.3 + (movement1 * 0.8) * (1.0 - movement3)) + Quaternion::rotation_x(s_a.stc.3 + (move1 * 0.8) * (1.0 - move3)) * Quaternion::rotation_y( - s_a.stc.4 + (movement1 * -0.15 + movement2 * -0.15) * (1.0 - movement3), + s_a.stc.4 + (move1 * -0.15 + move2 * -0.15) * (1.0 - move3), ) - * Quaternion::rotation_z((movement1 * 0.8 + movement2 * -0.8) * (1.0 - movement3)); + * Quaternion::rotation_z((move1 * 0.8 + move2 * -0.8) * (1.0 - move3)); - next.head.orientation = Quaternion::rotation_x((movement1 * 0.4) * (1.0 - movement3)) - * Quaternion::rotation_z((twist * 0.2 + movement2 * -0.8) * (1.0 - movement3)); + next.head.orientation = Quaternion::rotation_x((move1 * 0.4) * (1.0 - move3)) + * Quaternion::rotation_z((twist * 0.2 + move2 * -0.8) * (1.0 - move3)); next.chest.position = Vec3::new( 0.0, s_a.chest.0, - s_a.chest.1 + (movement1 * 2.0 + movement2 * -4.0) * (1.0 - movement3), + s_a.chest.1 + (move1 * 2.0 + move2 * -4.0) * (1.0 - move3), ); - next.chest.orientation = Quaternion::rotation_x((movement2 * -0.8) * (1.0 - movement3)) - * Quaternion::rotation_z(twist * -0.2 + movement2 * -0.1 + (1.0 - movement3)); + next.chest.orientation = Quaternion::rotation_x((move2 * -0.8) * (1.0 - move3)) + * Quaternion::rotation_z(twist * -0.2 + move2 * -0.1 + (1.0 - move3)); - next.belt.orientation = Quaternion::rotation_x((movement2 * 0.2) * (1.0 - movement3)) - * Quaternion::rotation_z((twist * 0.6 + movement2 * -0.48) * (1.0 - movement3)); + next.belt.orientation = Quaternion::rotation_x((move2 * 0.2) * (1.0 - move3)) + * Quaternion::rotation_z((twist * 0.6 + move2 * -0.48) * (1.0 - move3)); - next.shorts.orientation = Quaternion::rotation_x((movement2 * 0.3) * (1.0 - movement3)) - * Quaternion::rotation_z((twist + movement2 * -0.8) * (1.0 - movement3)); + next.shorts.orientation = Quaternion::rotation_x((move2 * 0.3) * (1.0 - move3)) + * Quaternion::rotation_z((twist + move2 * -0.8) * (1.0 - move3)); if velocity < 0.5 { next.foot_l.position = Vec3::new( -s_a.foot.0, - s_a.foot.1 + movement1 * -7.0 + movement2 * 7.0, + s_a.foot.1 + move1 * -7.0 + move2 * 7.0, s_a.foot.2, ); - next.foot_l.orientation = Quaternion::rotation_x(movement1 * -0.8 + movement2 * 0.8) - * Quaternion::rotation_z(movement1 * 0.3 + movement2 * -0.3); + next.foot_l.orientation = Quaternion::rotation_x(move1 * -0.8 + move2 * 0.8) + * Quaternion::rotation_z(move1 * 0.3 + move2 * -0.3); next.foot_r.position = Vec3::new( s_a.foot.0, - s_a.foot.1 + movement1 * 5.0 + movement2 * -5.0, + s_a.foot.1 + move1 * 5.0 + move2 * -5.0, s_a.foot.2, ); - next.foot_r.orientation = Quaternion::rotation_y(movement1 * -0.3 + movement2 * 0.3) - * Quaternion::rotation_z(movement1 * 0.4 + movement2 * -0.4); + next.foot_r.orientation = Quaternion::rotation_y(move1 * -0.3 + move2 * 0.3) + * Quaternion::rotation_z(move1 * 0.4 + move2 * -0.4); } next } diff --git a/voxygen/anim/src/character/shoot.rs b/voxygen/anim/src/character/shoot.rs index 8a6a63e269..d16ac15bcd 100644 --- a/voxygen/anim/src/character/shoot.rs +++ b/voxygen/anim/src/character/shoot.rs @@ -63,14 +63,14 @@ impl Animation for ShootAnimation { } * 1.3; match active_tool_kind { Some(ToolKind::Staff) | Some(ToolKind::Sceptre) => { - let (movement1, movement2, movement3) = match stage_section { + let (move1, move2, move3) = match stage_section { Some(StageSection::Buildup) => (anim_time as f32, 0.0, 0.0), Some(StageSection::Swing) => (1.0, (anim_time as f32).powf(0.25), 0.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time as f32), _ => (0.0, 0.0, 0.0), }; - let xmove = (movement1 as f32 * 6.0 * lab as f32 + PI).sin(); - let ymove = (movement1 as f32 * 6.0 * lab as f32 + PI * (0.5)).sin(); + let xmove = (move1 as f32 * 6.0 * lab as f32 + PI).sin(); + let ymove = (move1 as f32 * 6.0 * lab as f32 + PI * (0.5)).sin(); next.hand_l.position = Vec3::new(s_a.sthl.0, s_a.sthl.1, s_a.sthl.2); next.hand_l.orientation = Quaternion::rotation_x(s_a.sthl.3); @@ -82,22 +82,21 @@ impl Animation for ShootAnimation { next.main.orientation = Quaternion::rotation_y(0.0); next.control.position = Vec3::new( - s_a.stc.0 + (xmove * 3.0 + movement1 * -4.0) * (1.0 - movement3), - s_a.stc.1 + (2.0 + ymove * 3.0 + movement2 * 3.0) * (1.0 - movement3), + s_a.stc.0 + (xmove * 3.0 + move1 * -4.0) * (1.0 - move3), + s_a.stc.1 + (2.0 + ymove * 3.0 + move2 * 3.0) * (1.0 - move3), s_a.stc.2, ); next.control.orientation = - Quaternion::rotation_x(s_a.stc.3 + (movement2 * 0.6) * (1.0 - movement3)) - * Quaternion::rotation_y(s_a.stc.4 + (movement1 * 0.5 + movement2 * -0.5)) + Quaternion::rotation_x(s_a.stc.3 + (move2 * 0.6) * (1.0 - move3)) + * Quaternion::rotation_y(s_a.stc.4 + (move1 * 0.5 + move2 * -0.5)) * Quaternion::rotation_z( - s_a.stc.5 - - (0.2 + movement1 * -0.5 + movement2 * 0.8) * (1.0 - movement3), + s_a.stc.5 - (0.2 + move1 * -0.5 + move2 * 0.8) * (1.0 - move3), ); next.chest.orientation = - Quaternion::rotation_z((movement1 * 0.3 + movement2 * 0.2) * (1.0 - movement3)); + Quaternion::rotation_z((move1 * 0.3 + move2 * 0.2) * (1.0 - move3)); next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1); next.head.orientation = Quaternion::rotation_z( - tilt * -2.5 + (movement1 * -0.2 + movement2 * -0.4) * (1.0 - movement3), + tilt * -2.5 + (move1 * -0.2 + move2 * -0.4) * (1.0 - move3), ); if speed < 0.5 { @@ -117,7 +116,7 @@ impl Animation for ShootAnimation { }; }, Some(ToolKind::Bow) => { - let (_movement1, movement2, _movement3) = match stage_section { + let (_move1, move2, _move3) = match stage_section { Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0), Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0), Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4)), @@ -126,37 +125,36 @@ impl Animation for ShootAnimation { next.main.position = Vec3::new(0.0, 0.0, 0.0); next.main.orientation = Quaternion::rotation_x(0.0); next.hand_l.position = Vec3::new( - s_a.bhl.0 + movement2 * -2.0, - s_a.bhl.1 + movement2 * -6.0, - s_a.bhl.2 + movement2 * -3.0, + s_a.bhl.0 + move2 * -2.0, + s_a.bhl.1 + move2 * -6.0, + s_a.bhl.2 + move2 * -3.0, ); next.hand_l.orientation = Quaternion::rotation_x(s_a.bhl.3); next.hand_r.position = Vec3::new(s_a.bhr.0, s_a.bhr.1, s_a.bhr.2); next.hand_r.orientation = Quaternion::rotation_x(s_a.bhr.3); - next.hold.position = Vec3::new(0.0, -1.0 + movement2 * 2.0, -5.2 + movement2 * 7.0); + next.hold.position = Vec3::new(0.0, -1.0 + move2 * 2.0, -5.2 + move2 * 7.0); next.hold.orientation = Quaternion::rotation_x(-1.57); - next.hold.scale = Vec3::one() * 1.0 * (1.0 - movement2); + next.hold.scale = Vec3::one() * 1.0 * (1.0 - move2); next.control.position = Vec3::new(s_a.bc.0 + 11.0, s_a.bc.1 + 2.0, s_a.bc.2 + 8.0); - next.control.orientation = - Quaternion::rotation_x(0.0 + (movement2 as f32 * 0.1).sin()) - * Quaternion::rotation_y(s_a.bc.4 - 1.25) - * Quaternion::rotation_z(s_a.bc.5 - 0.2 + (movement2 as f32 * -0.2).sin()); + next.control.orientation = Quaternion::rotation_x(0.0 + (move2 as f32 * 0.1).sin()) + * Quaternion::rotation_y(s_a.bc.4 - 1.25) + * Quaternion::rotation_z(s_a.bc.5 - 0.2 + (move2 as f32 * -0.2).sin()); next.chest.orientation = Quaternion::rotation_z(0.8); next.head.position = Vec3::new(0.0 - 2.0, s_a.head.0, s_a.head.1); next.head.orientation = - Quaternion::rotation_z(tilt * -2.5 - 0.5 + (movement2 as f32 * 0.2).sin()); + Quaternion::rotation_z(tilt * -2.5 - 0.5 + (move2 as f32 * 0.2).sin()); if speed < 0.5 { next.chest.orientation = - Quaternion::rotation_z(0.8 + (movement2 as f32 * 0.1).sin()); + Quaternion::rotation_z(0.8 + (move2 as f32 * 0.1).sin()); next.belt.orientation = Quaternion::rotation_x(0.07) - * Quaternion::rotation_z((movement2 as f32 * -0.1).sin()); + * Quaternion::rotation_z((move2 as f32 * -0.1).sin()); next.shorts.orientation = Quaternion::rotation_x(0.08) - * Quaternion::rotation_z((movement2 as f32 * -0.15).sin()); + * Quaternion::rotation_z((move2 as f32 * -0.15).sin()); next.foot_l.position = Vec3::new(-s_a.foot.0, s_a.foot.1 - 5.0, s_a.foot.2); next.foot_l.orientation = Quaternion::rotation_x(-0.5); diff --git a/voxygen/anim/src/character/spinmelee.rs b/voxygen/anim/src/character/spinmelee.rs index 26b810d9ff..cba5ca8a50 100644 --- a/voxygen/anim/src/character/spinmelee.rs +++ b/voxygen/anim/src/character/spinmelee.rs @@ -30,7 +30,7 @@ impl Animation for SpinMeleeAnimation { s_a: &SkeletonAttr, ) -> Self::Skeleton { *rate = 1.0; - let (movement1, movement2, movement3) = match stage_section { + let (move1, move2, move3) = match stage_section { Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0), Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0), Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powf(4.0)), @@ -50,24 +50,19 @@ impl Animation for SpinMeleeAnimation { next.hand_r.orientation = Quaternion::rotation_x(s_a.shr.3) * Quaternion::rotation_y(s_a.shr.4); - next.control.position = Vec3::new(s_a.sc.0, s_a.sc.1, s_a.sc.2 + movement1 * 2.0); + next.control.position = Vec3::new(s_a.sc.0, s_a.sc.1, s_a.sc.2 + move1 * 2.0); next.control.orientation = - Quaternion::rotation_x(s_a.sc.3 + movement1 * -PI / 2.5 + movement3 * PI / 2.0) - * Quaternion::rotation_z( - s_a.sc.5 + movement1 * -PI / 2.0 + movement3 * PI / 2.0, - ); - next.torso.orientation = Quaternion::rotation_z(movement2 * PI * 2.0); + Quaternion::rotation_x(s_a.sc.3 + move1 * -PI / 2.5 + move3 * PI / 2.0) + * Quaternion::rotation_z(s_a.sc.5 + move1 * -PI / 2.0 + move3 * PI / 2.0); + next.torso.orientation = Quaternion::rotation_z(move2 * PI * 2.0); - next.chest.position = Vec3::new( - 0.0, - s_a.chest.0 + movement1 * -2.0, - s_a.chest.1 + movement1 * -3.0, - ); - next.chest.orientation = Quaternion::rotation_x(movement1 * -0.3) - * Quaternion::rotation_y(movement1 * 0.15 + movement3 * -0.15); + next.chest.position = + Vec3::new(0.0, s_a.chest.0 + move1 * -2.0, s_a.chest.1 + move1 * -3.0); + next.chest.orientation = Quaternion::rotation_x(move1 * -0.3) + * Quaternion::rotation_y(move1 * 0.15 + move3 * -0.15); next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1); - next.head.orientation = Quaternion::rotation_x(movement1 * 0.2 + movement3 * 0.15) - * Quaternion::rotation_z(movement2 * 0.8 + movement3 * -0.6); + next.head.orientation = Quaternion::rotation_x(move1 * 0.2 + move3 * 0.15) + * Quaternion::rotation_z(move2 * 0.8 + move3 * -0.6); next.belt.orientation = Quaternion::rotation_x(0.1); next.shorts.orientation = Quaternion::rotation_x(0.2); }, @@ -82,63 +77,52 @@ impl Animation for SpinMeleeAnimation { next.hand_r.orientation = Quaternion::rotation_x(s_a.ahr.3) * Quaternion::rotation_z(s_a.ahr.5); - next.control.position = Vec3::new( - s_a.ac.0 + movement1 * 8.0, - s_a.ac.1, - s_a.ac.2 + movement1 * -4.0, - ); + next.control.position = + Vec3::new(s_a.ac.0 + move1 * 8.0, s_a.ac.1, s_a.ac.2 + move1 * -4.0); next.control.orientation = - Quaternion::rotation_x(s_a.ac.3 + movement1 * -0.8 * (1.0 - movement3)) - * Quaternion::rotation_y(s_a.ac.4 + movement1 * -PI * (1.0 - movement3)) - * Quaternion::rotation_z(s_a.ac.5 + movement1 * 1.2 * (1.0 - movement3)); + Quaternion::rotation_x(s_a.ac.3 + move1 * -0.8 * (1.0 - move3)) + * Quaternion::rotation_y(s_a.ac.4 + move1 * -PI * (1.0 - move3)) + * Quaternion::rotation_z(s_a.ac.5 + move1 * 1.2 * (1.0 - move3)); - next.head.orientation = - Quaternion::rotation_x(movement1 * -0.2 * (1.0 - movement3)) - * Quaternion::rotation_z(movement1 * 0.4 * (1.0 - movement3)); - next.head.position = Vec3::new(0.0, s_a.head.0 + movement1 * 2.0, s_a.head.1); + next.head.orientation = Quaternion::rotation_x(move1 * -0.2 * (1.0 - move3)) + * Quaternion::rotation_z(move1 * 0.4 * (1.0 - move3)); + next.head.position = Vec3::new(0.0, s_a.head.0 + move1 * 2.0, s_a.head.1); - next.chest.position = Vec3::new( - 0.0, - s_a.chest.0, - s_a.chest.1 + movement1 * -1.0 * (1.0 - movement3), - ); - next.chest.orientation = - Quaternion::rotation_x(movement1 * 0.3 * (1.0 - movement3)) - * Quaternion::rotation_y(movement1 * 0.3 * (1.0 - movement3)); + next.chest.position = + Vec3::new(0.0, s_a.chest.0, s_a.chest.1 + move1 * -1.0 * (1.0 - move3)); + next.chest.orientation = Quaternion::rotation_x(move1 * 0.3 * (1.0 - move3)) + * Quaternion::rotation_y(move1 * 0.3 * (1.0 - move3)); next.belt.position = Vec3::new( 0.0, 1.0 + s_a.belt.0, - s_a.belt.1 + movement1 * 0.5 * (1.0 - movement3), + s_a.belt.1 + move1 * 0.5 * (1.0 - move3), ); next.belt.orientation = Quaternion::rotation_x(0.15); next.shorts.position = Vec3::new( 0.0, - 1.0 + s_a.shorts.0 + movement1 * 1.0 * (1.0 - movement3), - s_a.shorts.1 + movement1 * 1.0 * (1.0 - movement3), + 1.0 + s_a.shorts.0 + move1 * 1.0 * (1.0 - move3), + s_a.shorts.1 + move1 * 1.0 * (1.0 - move3), ); next.shorts.orientation = - Quaternion::rotation_x(0.15 + 0.15 * movement1 * (1.0 - movement3)); + Quaternion::rotation_x(0.15 + 0.15 * move1 * (1.0 - move3)); - next.torso.orientation = Quaternion::rotation_z( - movement1 * 1.0 * (1.0 - movement3) + movement2 * -2.0 * PI, - ); + next.torso.orientation = + Quaternion::rotation_z(move1 * 1.0 * (1.0 - move3) + move2 * -2.0 * PI); next.foot_l.position = Vec3::new( -s_a.foot.0, - s_a.foot.1 + movement1 * 7.0 * (1.0 - movement3), + s_a.foot.1 + move1 * 7.0 * (1.0 - move3), s_a.foot.2, ); - next.foot_l.orientation = - Quaternion::rotation_x(movement1 * 0.8 * (1.0 - movement3)); + next.foot_l.orientation = Quaternion::rotation_x(move1 * 0.8 * (1.0 - move3)); next.foot_r.position = Vec3::new( s_a.foot.0, - s_a.foot.1 + movement1 * -3.0 * (1.0 - movement3), + s_a.foot.1 + move1 * -3.0 * (1.0 - move3), s_a.foot.2, ); - next.foot_r.orientation = - Quaternion::rotation_x(movement1 * -0.5 * (1.0 - movement3)); + next.foot_r.orientation = Quaternion::rotation_x(move1 * -0.5 * (1.0 - move3)); }, _ => {}, diff --git a/voxygen/src/scene/figure/cache.rs b/voxygen/src/scene/figure/cache.rs index c94f3d1540..487a6d2dbe 100644 --- a/voxygen/src/scene/figure/cache.rs +++ b/voxygen/src/scene/figure/cache.rs @@ -86,6 +86,7 @@ pub(super) struct CharacterToolKey { /// Character data that exists in third person only. #[derive(Eq, Hash, PartialEq)] pub(super) struct CharacterThirdPersonKey { + pub head: Option, pub shoulder: Option, pub chest: Option, pub belt: Option, @@ -141,6 +142,17 @@ impl CharacterCacheKey { None } else { Some(CharacterThirdPersonKey { + head: if let Some(ItemKind::Armor(Armor { + kind: ArmorKind::Head(armor), + .. + })) = inventory + .equipped(EquipSlot::Armor(ArmorSlot::Head)) + .map(|i| i.kind()) + { + Some(armor.clone()) + } else { + None + }, shoulder: if let Some(ItemKind::Armor(Armor { kind: ArmorKind::Shoulder(armor), .. diff --git a/voxygen/src/scene/figure/load.rs b/voxygen/src/scene/figure/load.rs index 6dda5b6c69..2753eaa04d 100644 --- a/voxygen/src/scene/figure/load.rs +++ b/voxygen/src/scene/figure/load.rs @@ -2469,23 +2469,11 @@ impl FishSmallLateralSpec { //// -#[derive(Deserialize)] -struct BipedSmallCentralSpec(HashMap<(BSSpecies, BSBodyType), SidedBSCentralVoxSpec>); - -#[derive(Deserialize)] -struct SidedBSCentralVoxSpec { - head: BipedSmallCentralSubSpec, - tail: BipedSmallCentralSubSpec, -} -#[derive(Deserialize)] -struct BipedSmallCentralSubSpec { - offset: [f32; 3], // Should be relative to initial origin - central: VoxSimple, -} - #[derive(Deserialize)] struct BipedSmallWeaponSpec(HashMap); #[derive(Deserialize)] +struct BipedSmallArmorHeadSpec(ArmorVoxSpecMap); +#[derive(Deserialize)] struct BipedSmallArmorHandSpec(ArmorVoxSpecMap); #[derive(Deserialize)] struct BipedSmallArmorFootSpec(ArmorVoxSpecMap); @@ -2493,15 +2481,18 @@ struct BipedSmallArmorFootSpec(ArmorVoxSpecMap); struct BipedSmallArmorChestSpec(ArmorVoxSpecMap); #[derive(Deserialize)] struct BipedSmallArmorPantsSpec(ArmorVoxSpecMap); +#[derive(Deserialize)] +struct BipedSmallArmorTailSpec(ArmorVoxSpecMap); make_vox_spec!( biped_small::Body, struct BipedSmallSpec { - central: BipedSmallCentralSpec = "voxygen.voxel.biped_small_central_manifest", armor_foot: BipedSmallArmorFootSpec = "voxygen.voxel.biped_small_armor_foot_manifest", weapon: BipedSmallWeaponSpec = "voxygen.voxel.biped_small_weapon_manifest", armor_hand: BipedSmallArmorHandSpec = "voxygen.voxel.biped_small_armor_hand_manifest", armor_chest: BipedSmallArmorChestSpec = "voxygen.voxel.biped_small_armor_chest_manifest", armor_pants: BipedSmallArmorPantsSpec = "voxygen.voxel.biped_small_armor_pants_manifest", + armor_head: BipedSmallArmorHeadSpec = "voxygen.voxel.biped_small_armor_head_manifest", + armor_tail: BipedSmallArmorTailSpec = "voxygen.voxel.biped_small_armor_tail_manifest", }, |FigureKey { body, extra }, spec| { @@ -2523,10 +2514,11 @@ make_vox_spec!( [ - Some(spec.central.read().0.mesh_head( - body.species, - body.body_type, - )), + third_person.map(|loadout| { + spec.armor_head.read().0.mesh_head( + loadout.head.as_deref(), + ) + }), third_person.map(|loadout| { spec.armor_chest.read().0.mesh_chest( loadout.chest.as_deref(), @@ -2537,10 +2529,11 @@ make_vox_spec!( loadout.pants.as_deref(), ) }), - Some(spec.central.read().0.mesh_tail( - body.species, - body.body_type, - )), + third_person.map(|loadout| { + spec.armor_tail.read().0.mesh_tail( + loadout.belt.as_deref(), + ) + }), tool.and_then(|tool| tool.active.as_ref()).map(|tool| { spec.weapon.read().0.mesh_main( tool, @@ -2570,40 +2563,27 @@ make_vox_spec!( }, ); -impl BipedSmallCentralSpec { - fn mesh_head(&self, species: BSSpecies, body_type: BSBodyType) -> BoneMeshes { - let spec = match self.0.get(&(species, body_type)) { - Some(spec) => spec, - None => { - error!( - "No head specification exists for the combination of {:?} and {:?}", - species, body_type - ); - return load_mesh("not_found", Vec3::new(-5.0, -5.0, -2.5)); - }, +impl BipedSmallArmorHeadSpec { + fn mesh_head(&self, head: Option<&str>) -> BoneMeshes { + let spec = if let Some(head) = head { + match self.0.map.get(head) { + Some(spec) => spec, + None => { + error!(?head, "No head specification exists"); + return load_mesh("not_found", Vec3::new(-1.5, -1.5, -7.0)); + }, + } + } else { + &self.0.default }; - let central = graceful_load_segment(&spec.head.central.0); - (central, Vec3::from(spec.head.offset)) - } + let head_segment = graceful_load_segment(&spec.vox_spec.0); - fn mesh_tail(&self, species: BSSpecies, body_type: BSBodyType) -> BoneMeshes { - let spec = match self.0.get(&(species, body_type)) { - Some(spec) => spec, - None => { - error!( - "No tail specification exists for the combination of {:?} and {:?}", - species, body_type - ); - return load_mesh("not_found", Vec3::new(-5.0, -5.0, -2.5)); - }, - }; - let central = graceful_load_segment(&spec.tail.central.0); + let offset = Vec3::new(spec.vox_spec.1[0], spec.vox_spec.1[1], spec.vox_spec.1[2]); - (central, Vec3::from(spec.tail.offset)) + (head_segment, offset) } } - impl BipedSmallArmorChestSpec { fn mesh_chest(&self, chest: Option<&str>) -> BoneMeshes { let spec = if let Some(chest) = chest { @@ -2625,6 +2605,27 @@ impl BipedSmallArmorChestSpec { (chest_segment, offset) } } +impl BipedSmallArmorTailSpec { + fn mesh_tail(&self, tail: Option<&str>) -> BoneMeshes { + let spec = if let Some(tail) = tail { + match self.0.map.get(tail) { + Some(spec) => spec, + None => { + error!(?tail, "No tail specification exists"); + return load_mesh("not_found", Vec3::new(-1.5, -1.5, -7.0)); + }, + } + } else { + &self.0.default + }; + + let tail_segment = graceful_load_segment(&spec.vox_spec.0); + + let offset = Vec3::new(spec.vox_spec.1[0], spec.vox_spec.1[1], spec.vox_spec.1[2]); + + (tail_segment, offset) + } +} impl BipedSmallArmorPantsSpec { fn mesh_pants(&self, pants: Option<&str>) -> BoneMeshes { let spec = if let Some(pants) = pants { diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index 95a7e7f4ef..5ad3081589 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -1326,16 +1326,6 @@ impl FigureMgr { skeleton_attr, ) }, - /* - CharacterState::Charge(_) => { - anim::character::ChargeAnimation::update_skeleton( - &target_base, - (active_tool_kind, time), - state.state_time, - &mut state_animation_rate, - skeleton_attr, - ) - }*/ CharacterState::Equipping { .. } => { anim::character::EquipAnimation::update_skeleton( &target_base, diff --git a/voxygen/src/scene/particle.rs b/voxygen/src/scene/particle.rs index 7389fa66f4..62da9320a7 100644 --- a/voxygen/src/scene/particle.rs +++ b/voxygen/src/scene/particle.rs @@ -642,7 +642,7 @@ impl ParticleMgr { let theta = ori_vec.y.atan2(ori_vec.x); let dtheta = radians / distance; - let heartbeats = self.scheduler.heartbeats(Duration::from_millis(5)); + let heartbeats = self.scheduler.heartbeats(Duration::from_millis(2)); for heartbeat in 0..heartbeats { if shockwave.properties.requires_ground { diff --git a/world/src/site/dungeon/mod.rs b/world/src/site/dungeon/mod.rs index 22afd7de26..f1e0217fe6 100644 --- a/world/src/site/dungeon/mod.rs +++ b/world/src/site/dungeon/mod.rs @@ -861,17 +861,6 @@ impl Floor { 2 ], 3 => vec![ - EntityInfo::at(tile_wcenter.map(|e| e as f32)) - .with_body(comp::Body::BipedLarge( - comp::biped_large::Body::random_with( - dynamic_rng, - &comp::biped_large::Species::Minotaur, - ), - )) - .with_name("Minotaur".to_string()) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)), - ], - 4 => vec![ EntityInfo::at(tile_wcenter.map(|e| e as f32)) .with_body(comp::Body::Golem( comp::golem::Body::random_with( @@ -882,6 +871,17 @@ impl Floor { .with_name("Stonework Defender".to_string()) .with_loot_drop(comp::Item::new_from_asset_expect(chosen)), ], + 4 => vec![ + EntityInfo::at(tile_wcenter.map(|e| e as f32)) + .with_body(comp::Body::BipedLarge( + comp::biped_large::Body::random_with( + dynamic_rng, + &comp::biped_large::Species::Minotaur, + ), + )) + .with_name("Minotaur".to_string()) + .with_loot_drop(comp::Item::new_from_asset_expect(chosen)), + ], 5 => vec![ EntityInfo::at(tile_wcenter.map(|e| e as f32)) .with_body(comp::Body::BipedLarge(