diff --git a/assets/common/items/boss_drops/lantern.ron b/assets/common/items/boss_drops/lantern.ron index eeb23cf6cc..82fa2c248d 100644 --- a/assets/common/items/boss_drops/lantern.ron +++ b/assets/common/items/boss_drops/lantern.ron @@ -3,12 +3,12 @@ ItemDef( description: "Illuminates even the darkest dungeon\nA great monster was slain for this item", kind: Lantern( ( - kind: "Blue0", + kind: "Green0", color: (r: 128, g: 26, b: 255), strength_thousandths: 8500, flicker_thousandths: 300, ), ), - quality: High, + quality: Epic, tags: [Utility], ) diff --git a/assets/voxygen/voxel/armor/misc/lantern/black-0.vox b/assets/voxygen/voxel/armor/misc/lantern/black-0.vox deleted file mode 100644 index 620f002bf3..0000000000 --- a/assets/voxygen/voxel/armor/misc/lantern/black-0.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3057877edf5bd955d80fed44b00f64c0fae9287f4cb9cb417b3cdcefc899d424 -size 1384 diff --git a/assets/voxygen/voxel/armor/misc/lantern/blue-0.vox b/assets/voxygen/voxel/armor/misc/lantern/blue-0.vox deleted file mode 100644 index 8012f31a8f..0000000000 --- a/assets/voxygen/voxel/armor/misc/lantern/blue-0.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:54692b8a8fe500c7bb352033f06696123924fab78e3cf1e3a08ed610cef36de9 -size 1384 diff --git a/assets/voxygen/voxel/armor/misc/lantern/green-0.vox b/assets/voxygen/voxel/armor/misc/lantern/green-0.vox deleted file mode 100644 index 6305f11288..0000000000 --- a/assets/voxygen/voxel/armor/misc/lantern/green-0.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4ee771034347313e31f4518019911b832deb71f074494225e9b771b485826257 -size 1384 diff --git a/assets/voxygen/voxel/armor/misc/lantern/red-0.vox b/assets/voxygen/voxel/armor/misc/lantern/red-0.vox deleted file mode 100644 index 2cfc2142e7..0000000000 --- a/assets/voxygen/voxel/armor/misc/lantern/red-0.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9d168ab7baea56575aa7542305691a932d80ba449079076ef166c2490cd53844 -size 1384 diff --git a/assets/voxygen/voxel/humanoid_lantern_manifest.ron b/assets/voxygen/voxel/humanoid_lantern_manifest.ron index 6b600a9cd3..c77d78b2eb 100644 --- a/assets/voxygen/voxel/humanoid_lantern_manifest.ron +++ b/assets/voxygen/voxel/humanoid_lantern_manifest.ron @@ -5,23 +5,23 @@ ), map: { "Green0": ( - vox_spec: ("armor.misc.lantern.green-0", (-2.0, -2.0, -7.0)), + vox_spec: ("lantern.green-0", (-2.0, -2.0, -7.0)), color: None ), "Black0": ( - vox_spec: ("armor.misc.lantern.black-0", (-2.0, -2.0, -7.0)), + vox_spec: ("lantern.black-0", (-2.0, -2.0, -8.5)), color: None ), "Red0": ( - vox_spec: ("armor.misc.lantern.red-0", (-2.0, -2.0, -7.0)), + vox_spec: ("lantern.red-0", (-2.0, -2.0, -7.0)), color: None ), "Blue0": ( - vox_spec: ("armor.misc.lantern.blue-0", (-2.0, -2.0, -7.0)), + vox_spec: ("lantern.blue-0", (-2.0, -2.0, -7.0)), color: None ), "GeodePurp": ( - vox_spec: ("lantern.geode_purp", (-3.0, -3.0, -7.0)), + vox_spec: ("lantern.geode_purp", (-2.5, -2.5, -9.5)), color: None ), }, diff --git a/assets/voxygen/voxel/lantern/black-0.vox b/assets/voxygen/voxel/lantern/black-0.vox index b71db60214..092a32a4d7 100644 --- a/assets/voxygen/voxel/lantern/black-0.vox +++ b/assets/voxygen/voxel/lantern/black-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6843626fd5bcb745ecfdc6e1c4341c89a3f84ad9a2d173ce38bc9786304e6402 -size 1892 +oid sha256:4c26b7302cb1889047d7498a482a5aa10b946d008ecbf699e74b7935a8cccd2b +size 1404 diff --git a/assets/voxygen/voxel/lantern/blue-0.vox b/assets/voxygen/voxel/lantern/blue-0.vox new file mode 100644 index 0000000000..1f9b3f481e --- /dev/null +++ b/assets/voxygen/voxel/lantern/blue-0.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74dce3eee748abc472024397e98332bb3673123d5e6e0bea2f8bfaea26afef56 +size 1404 diff --git a/assets/voxygen/voxel/lantern/geode_purp.vox b/assets/voxygen/voxel/lantern/geode_purp.vox index b2c7fc7e71..d580f94c66 100644 --- a/assets/voxygen/voxel/lantern/geode_purp.vox +++ b/assets/voxygen/voxel/lantern/geode_purp.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:09a0300e03192fc8b5fe95f504ac896341f317456b28f6e0ee2c3541a16c8c78 -size 1500 +oid sha256:a0418a4af05e7d335a746074e725193d8c94dc2e0b41fb594218002e486ce194 +size 1476 diff --git a/assets/voxygen/voxel/lantern/green-0.vox b/assets/voxygen/voxel/lantern/green-0.vox index fa5e2c601f..0923c3d2cd 100644 --- a/assets/voxygen/voxel/lantern/green-0.vox +++ b/assets/voxygen/voxel/lantern/green-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ec0492756972b9c934e660757f7ecdb2dbe5b6e99dddae42f178dd0e6c328bbb -size 1892 +oid sha256:de5f07bfee3fd6b9d9d387cc679b13a985addcdd2e1d1389019a9b28cde3d378 +size 1404 diff --git a/assets/voxygen/voxel/lantern/red-0.vox b/assets/voxygen/voxel/lantern/red-0.vox new file mode 100644 index 0000000000..0110b1a370 --- /dev/null +++ b/assets/voxygen/voxel/lantern/red-0.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:302f82c415f2f6cd2281355734cf4a20eea991b6c8eb179149fe0a6389433840 +size 1404 diff --git a/assets/voxygen/voxel/sprite/cooking_pot/pot-0.vox b/assets/voxygen/voxel/sprite/cooking_pot/pot-0.vox index 14e9a3c62f..e96703828c 100644 --- a/assets/voxygen/voxel/sprite/cooking_pot/pot-0.vox +++ b/assets/voxygen/voxel/sprite/cooking_pot/pot-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e616ae51d56fd59d500371e7b1341dbb46352b7e367168dd0e4988ce539e3847 -size 8340 +oid sha256:51e5ea3789ec7f118a8ca9022129371e8bf9b4143f57e8d117f96d60b7711892 +size 5884 diff --git a/common/src/comp/character_state.rs b/common/src/comp/character_state.rs index 553384db9f..40414c39ad 100644 --- a/common/src/comp/character_state.rs +++ b/common/src/comp/character_state.rs @@ -175,6 +175,7 @@ impl CharacterState { | CharacterState::Dance | CharacterState::Glide | CharacterState::GlideWield + | CharacterState::Talk | CharacterState::Roll(_), ) } diff --git a/voxygen/anim/src/character/alpha.rs b/voxygen/anim/src/character/alpha.rs index a0f54002c3..0004398591 100644 --- a/voxygen/anim/src/character/alpha.rs +++ b/voxygen/anim/src/character/alpha.rs @@ -290,6 +290,14 @@ impl Animation for AlphaAnimation { next.second = next.main; } + if skeleton.holding_lantern { + next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1 + 5.0, s_a.hand.2 + 12.0); + next.hand_r.orientation = Quaternion::rotation_x(2.25) * Quaternion::rotation_z(0.9); + + next.lantern.position = Vec3::new(-0.5, -0.5, -1.5); + next.lantern.orientation = next.hand_r.orientation.inverse(); + } + next } } diff --git a/voxygen/anim/src/character/jump.rs b/voxygen/anim/src/character/jump.rs index a95b2560be..1a2788e703 100644 --- a/voxygen/anim/src/character/jump.rs +++ b/voxygen/anim/src/character/jump.rs @@ -196,7 +196,7 @@ impl Animation for JumpAnimation { next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1 + 5.0, s_a.hand.2 + 9.0); next.hand_r.orientation = Quaternion::rotation_x(2.25) * Quaternion::rotation_z(0.9); - next.lantern.position = Vec3::new(0.0, 0.0, -3.5); + next.lantern.position = Vec3::new(-0.5, -0.5, -2.5); next.lantern.orientation = next.hand_r.orientation.inverse() * Quaternion::rotation_x(slow * 0.5) * Quaternion::rotation_y(tilt * 4.0 * slow + tilt * 3.0); diff --git a/voxygen/anim/src/character/mod.rs b/voxygen/anim/src/character/mod.rs index a5e27f00c0..7e01dcde4a 100644 --- a/voxygen/anim/src/character/mod.rs +++ b/voxygen/anim/src/character/mod.rs @@ -132,7 +132,7 @@ impl Skeleton for CharacterSkeleton { // FIXME: Should this be control_l_mat? make_bone(control_mat * hand_l_mat * Mat4::::from(self.hold)), ]; - (lantern_mat * Vec4::new(-0.0, -0.0, -1.5, 1.0)).xyz() + (lantern_mat * Vec4::new(0.0, 0.0, -4.0, 1.0)).xyz() } } diff --git a/voxygen/anim/src/character/run.rs b/voxygen/anim/src/character/run.rs index 96d1c9cada..be92f7d247 100644 --- a/voxygen/anim/src/character/run.rs +++ b/voxygen/anim/src/character/run.rs @@ -258,16 +258,19 @@ impl Animation for RunAnimation { if skeleton.holding_lantern { next.hand_r.position = Vec3::new( - s_a.hand.0, - s_a.hand.1 + 5.0 - impact * 0.2, - s_a.hand.2 + 11.0 + impact * -0.1, + s_a.hand.0 + 1.0, + s_a.hand.1 + 2.0 - impact * 0.2, + s_a.hand.2 + 12.0 + impact * -0.1, ); next.hand_r.orientation = Quaternion::rotation_x(2.25) * Quaternion::rotation_z(0.9); - next.lantern.position = Vec3::new(0.0, 0.0, -2.5); + let fast = (anim_time * 8.0).sin(); + let fast2 = (anim_time * 6.0 + 8.0).sin(); + + next.lantern.position = Vec3::new(-0.5, -0.5, -2.5); next.lantern.orientation = next.hand_r.orientation.inverse() - * Quaternion::rotation_x((foothorir + 0.5) * 1.0 * speednorm) - * Quaternion::rotation_y(tilt * 4.0 * foothorir + tilt * 3.0); + * Quaternion::rotation_x((fast + 0.5) * 1.0 * speednorm) + * Quaternion::rotation_y(tilt * 4.0 * fast + tilt * 3.0 + fast2 * speednorm * 0.25); } next.torso.position = Vec3::new(0.0, 0.0, 0.0) * s_a.scaler; diff --git a/voxygen/anim/src/character/sit.rs b/voxygen/anim/src/character/sit.rs index 558e184ba6..b25cf67135 100644 --- a/voxygen/anim/src/character/sit.rs +++ b/voxygen/anim/src/character/sit.rs @@ -89,17 +89,22 @@ impl Animation for SitAnimation { if skeleton.holding_lantern { next.hand_r.position = Vec3::new( - s_a.hand.0 - head_look.x * 10.0, - s_a.hand.1 + 5.0 + head_look.y * 12.0, - s_a.hand.2 + 9.0 - head_look.y * 12.0, + s_a.hand.0 + 1.0 - head_look.x * 8.0, + s_a.hand.1 + 5.0 + head_look.x * 6.0, + s_a.hand.2 + 9.0 + head_look.y * 6.0, ); next.hand_r.orientation = Quaternion::rotation_x(2.25) * Quaternion::rotation_z(0.9) * Quaternion::rotation_y(head_look.x * 3.0) * Quaternion::rotation_x(head_look.y * 3.0); - next.lantern.position = Vec3::new(0.0, 0.0, -3.5); - next.lantern.orientation = next.hand_r.orientation.inverse(); + let fast = (anim_time * 5.0).sin(); + let fast2 = (anim_time * 4.5 + 8.0).sin(); + + next.lantern.position = Vec3::new(-0.5, -0.5, -2.5); + next.lantern.orientation = next.hand_r.orientation.inverse() + * Quaternion::rotation_x(fast * 0.1) + * Quaternion::rotation_y(fast2 * 0.1); } next diff --git a/voxygen/anim/src/character/stand.rs b/voxygen/anim/src/character/stand.rs index c45776b1df..5a634d4ab4 100644 --- a/voxygen/anim/src/character/stand.rs +++ b/voxygen/anim/src/character/stand.rs @@ -32,7 +32,6 @@ impl Animation for StandAnimation { let mut next = (*skeleton).clone(); let slow = (anim_time * 1.0).sin(); - let fast = (anim_time * 5.0).sin(); let impact = (avg_vel.z).max(-15.0); let head_look = Vec2::new( ((global_time + anim_time) / 10.0).floor().mul(7331.0).sin() * 0.15, @@ -147,16 +146,20 @@ impl Animation for StandAnimation { next.hand_r.position = Vec3::new( s_a.hand.0 - head_look.x * 10.0, s_a.hand.1 + 5.0 - head_look.y * 8.0 + slow * 0.15 - impact * 0.2, - s_a.hand.2 + 11.0 + slow * 0.5 + impact * -0.1, + s_a.hand.2 + 12.0 + slow * 0.5 + impact * -0.1, ); next.hand_r.orientation = Quaternion::rotation_x(2.5 + slow * -0.06 + impact * -0.1) * Quaternion::rotation_z(0.9) - * Quaternion::rotation_y(head_look.x * 3.0) - * Quaternion::rotation_x(head_look.y * 3.0); + * Quaternion::rotation_y(head_look.x * 1.5) + * Quaternion::rotation_x(head_look.y * 1.5); - next.lantern.position = Vec3::new(0.0, 0.0, -3.5); - next.lantern.orientation = - next.hand_r.orientation.inverse() * Quaternion::rotation_x(fast * 0.1); + let fast = (anim_time * 5.0).sin(); + let fast2 = (anim_time * 4.5 + 8.0).sin(); + + next.lantern.position = Vec3::new(-0.5, -0.5, -2.5); + next.lantern.orientation = next.hand_r.orientation.inverse() + * Quaternion::rotation_x(fast * 0.1) + * Quaternion::rotation_y(fast2 * 0.1); } next.torso.position = Vec3::new(0.0, 0.0, 0.0) * s_a.scaler; diff --git a/voxygen/anim/src/character/wield.rs b/voxygen/anim/src/character/wield.rs index aaa4f035d2..66c91a7d73 100644 --- a/voxygen/anim/src/character/wield.rs +++ b/voxygen/anim/src/character/wield.rs @@ -341,17 +341,24 @@ impl Animation for WieldAnimation { if skeleton.holding_lantern { next.hand_r.position = Vec3::new( - s_a.hand.0 - head_look.x * 10.0, - s_a.hand.1 + 5.0 + slow * 0.15, - s_a.hand.2 + 9.0 + head_look.y * 18.0 + slow * 0.5, + s_a.hand.0 - head_look.x * 6.0, + s_a.hand.1 + 5.0 - head_look.y * 10.0 + slow * 0.15, + s_a.hand.2 + 12.0 + head_look.y * 6.0 + slow * 0.5, ); next.hand_r.orientation = Quaternion::rotation_x(2.25 + slow * -0.06) * Quaternion::rotation_z(0.9) - * Quaternion::rotation_y(head_look.x * 3.0) - * Quaternion::rotation_x(head_look.y * 3.0); + * Quaternion::rotation_y(head_look.x * 1.5) + * Quaternion::rotation_x(head_look.y * 1.5); - next.lantern.position = Vec3::new(0.0, 0.0, -3.5); - next.lantern.orientation = next.hand_r.orientation.inverse(); + let fast = (anim_time * 8.0).sin(); + let fast2 = (anim_time * 6.0 + 8.0).sin(); + + next.lantern.position = Vec3::new(-0.5, -0.5, -2.5); + next.lantern.orientation = next.hand_r.orientation.inverse() + * Quaternion::rotation_x((fast + 0.5) * 1.0 * speednorm + fast * 0.1) + * Quaternion::rotation_y( + tilt * 1.0 * fast + tilt * 1.0 + fast2 * speednorm * 0.25 + fast2 * 0.1, + ); } next diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index 0a1e935f54..e583942cfa 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -28,7 +28,7 @@ use anim::{ use common::{ comp::{ inventory::slot::EquipSlot, - item::{ItemKind, ToolKind}, + item::{Hands, ItemKind, ToolKind}, Body, CharacterState, Controller, Health, Inventory, Item, Last, LightAnimation, LightEmitter, Ori, PhysicsState, PoiseState, Pos, Scale, Vel, }, @@ -765,7 +765,8 @@ impl FigureMgr { let holding_lantern = inventory .map_or(false, |i| i.equipped(EquipSlot::Lantern).is_some()) && light_emitter.is_some() - && !(matches!(second_tool_hand, Some(_)) + && !((matches!(second_tool_hand, Some(_)) + || matches!(active_tool_hand, Some(Hands::Two))) && character.map_or(false, |c| c.is_wield())) && !character.map_or(false, |c| c.is_using_hands()) && physics.in_liquid().is_none();