From 238fcaf5f16db11329d2a4be17cf1d8f5061eabe Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 26 Feb 2021 14:32:22 -0500 Subject: [PATCH] Particle rebase fixes --- .../abilities/staffsimple/flamethrower.ron | 1 + .../unique/quadlowbeam/healingbeam.ron | 1 + .../items/npc_weapons/axe/minotaur_axe.ron | 4 +- .../biped_small/adlet/adlet_bow.ron | 4 +- .../biped_small/adlet/gnoll_staff.ron | 4 +- .../biped_small/adlet/wooden_spear.ron | 4 +- .../biped_small/gnarling/adlet_bow.ron | 4 +- .../biped_small/gnarling/gnoll_staff.ron | 4 +- .../biped_small/gnarling/wooden_spear.ron | 4 +- .../biped_small/haniwa/adlet_bow.ron | 10 +- .../biped_small/haniwa/gnoll_staff.ron | 10 +- .../biped_small/haniwa/wooden_spear.ron | 10 +- .../biped_small/myrmidon/adlet_bow.ron | 4 +- .../biped_small/myrmidon/gnoll_staff.ron | 4 +- .../biped_small/myrmidon/wooden_spear.ron | 4 +- .../biped_small/sahagin/adlet_bow.ron | 4 +- .../biped_small/sahagin/gnoll_staff.ron | 4 +- .../biped_small/sahagin/wooden_spear.ron | 4 +- .../items/npc_weapons/hammer/yeti_hammer.ron | 4 +- .../items/npc_weapons/unique/tidal_claws.ron | 4 +- .../npc_weapons/unique/wendigo_magic.ron | 4 +- common/src/states/basic_beam.rs | 24 ++-- voxygen/src/scene/figure/load.rs | 42 +++---- voxygen/src/scene/figure/mod.rs | 2 +- voxygen/src/scene/particle.rs | 113 +++++++++--------- world/src/site/dungeon/mod.rs | 10 +- 26 files changed, 139 insertions(+), 148 deletions(-) diff --git a/assets/common/abilities/staffsimple/flamethrower.ron b/assets/common/abilities/staffsimple/flamethrower.ron index 6145e64192..905372944f 100644 --- a/assets/common/abilities/staffsimple/flamethrower.ron +++ b/assets/common/abilities/staffsimple/flamethrower.ron @@ -11,4 +11,5 @@ BasicBeam( energy_regen: 0, energy_cost: 1, energy_drain: 350, + orientation_behavior: Normal, ) diff --git a/assets/common/abilities/unique/quadlowbeam/healingbeam.ron b/assets/common/abilities/unique/quadlowbeam/healingbeam.ron index 3c5822dbb2..8b6b235b6f 100644 --- a/assets/common/abilities/unique/quadlowbeam/healingbeam.ron +++ b/assets/common/abilities/unique/quadlowbeam/healingbeam.ron @@ -11,4 +11,5 @@ BasicBeam( energy_regen: 25, energy_cost: 50, energy_drain: 0, + orientation_behavior: Normal, ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/axe/minotaur_axe.ron b/assets/common/items/npc_weapons/axe/minotaur_axe.ron index 2be8c68b62..81fc250ae6 100644 --- a/assets/common/items/npc_weapons/axe/minotaur_axe.ron +++ b/assets/common/items/npc_weapons/axe/minotaur_axe.ron @@ -5,12 +5,12 @@ ItemDef( ( kind: AxeSimple, hands: Two, - stats: ( + stats: Direct(( equip_time_millis: 500, power: 1.8, poise_strength: 1.00, speed: 1.0 - ), + )), ) ), quality: Low, diff --git a/assets/common/items/npc_weapons/biped_small/adlet/adlet_bow.ron b/assets/common/items/npc_weapons/biped_small/adlet/adlet_bow.ron index e0e5f9ee14..4e0dc79778 100644 --- a/assets/common/items/npc_weapons/biped_small/adlet/adlet_bow.ron +++ b/assets/common/items/npc_weapons/biped_small/adlet/adlet_bow.ron @@ -5,12 +5,12 @@ ItemDef( ( kind: Bow, hands: Two, - stats: ( + stats: Direct(( equip_time_millis: 0, power: 0.7, poise_strength: 0.8, speed: 0.3 - ), + )), ) ), quality: Moderate, diff --git a/assets/common/items/npc_weapons/biped_small/adlet/gnoll_staff.ron b/assets/common/items/npc_weapons/biped_small/adlet/gnoll_staff.ron index 44661cb2f6..181c5d8382 100644 --- a/assets/common/items/npc_weapons/biped_small/adlet/gnoll_staff.ron +++ b/assets/common/items/npc_weapons/biped_small/adlet/gnoll_staff.ron @@ -5,12 +5,12 @@ ItemDef( ( kind: StaffSimple, hands: Two, - stats: ( + stats: Direct(( equip_time_millis: 0, power: 0.7, poise_strength: 0.8, speed: 0.5 - ), + )), ) ), quality: Low, diff --git a/assets/common/items/npc_weapons/biped_small/adlet/wooden_spear.ron b/assets/common/items/npc_weapons/biped_small/adlet/wooden_spear.ron index 30304e3046..a78f795b25 100644 --- a/assets/common/items/npc_weapons/biped_small/adlet/wooden_spear.ron +++ b/assets/common/items/npc_weapons/biped_small/adlet/wooden_spear.ron @@ -5,12 +5,12 @@ ItemDef( ( kind: Spear, hands: Two, - stats: ( + stats: Direct(( equip_time_millis: 0, power: 0.7, poise_strength: 0.8, speed: 1.0 - ), + )), ) ), quality: Low, diff --git a/assets/common/items/npc_weapons/biped_small/gnarling/adlet_bow.ron b/assets/common/items/npc_weapons/biped_small/gnarling/adlet_bow.ron index 03bc224c53..d7c6609b52 100644 --- a/assets/common/items/npc_weapons/biped_small/gnarling/adlet_bow.ron +++ b/assets/common/items/npc_weapons/biped_small/gnarling/adlet_bow.ron @@ -5,12 +5,12 @@ ItemDef( ( kind: Bow, hands: Two, - stats: ( + stats: Direct(( equip_time_millis: 0, power: 0.3, poise_strength: 0.8, speed: 0.7 - ), + )), ) ), quality: Moderate, diff --git a/assets/common/items/npc_weapons/biped_small/gnarling/gnoll_staff.ron b/assets/common/items/npc_weapons/biped_small/gnarling/gnoll_staff.ron index 6c8dbbecf7..f3fdc1f4da 100644 --- a/assets/common/items/npc_weapons/biped_small/gnarling/gnoll_staff.ron +++ b/assets/common/items/npc_weapons/biped_small/gnarling/gnoll_staff.ron @@ -5,12 +5,12 @@ ItemDef( ( kind: StaffSimple, hands: Two, - stats: ( + stats: Direct(( equip_time_millis: 0, power: 0.3, poise_strength: 0.8, speed: 0.8 - ), + )), ) ), quality: Low, diff --git a/assets/common/items/npc_weapons/biped_small/gnarling/wooden_spear.ron b/assets/common/items/npc_weapons/biped_small/gnarling/wooden_spear.ron index 0182898eaa..82f65af672 100644 --- a/assets/common/items/npc_weapons/biped_small/gnarling/wooden_spear.ron +++ b/assets/common/items/npc_weapons/biped_small/gnarling/wooden_spear.ron @@ -5,12 +5,12 @@ ItemDef( ( kind: Spear, hands: Two, - stats: ( + stats: Direct(( equip_time_millis: 0, power: 0.3, poise_strength: 0.8, speed: 1.0 - ), + )), ) ), quality: Low, diff --git a/assets/common/items/npc_weapons/biped_small/haniwa/adlet_bow.ron b/assets/common/items/npc_weapons/biped_small/haniwa/adlet_bow.ron index 6bb840c1f6..02abadbeb0 100644 --- a/assets/common/items/npc_weapons/biped_small/haniwa/adlet_bow.ron +++ b/assets/common/items/npc_weapons/biped_small/haniwa/adlet_bow.ron @@ -1,18 +1,16 @@ ItemDef( name: "Adlet Bow", description: "Strips of leather are wrapped around the handle.", - kind: Tool( - ( + kind: Tool(( kind: Bow, hands: Two, - stats: ( + stats: Direct(( equip_time_millis: 0, power: 1.6, poise_strength: 0.8, speed: 0.3 - ), - ) - ), + )), + )), quality: Moderate, tags: [], ) diff --git a/assets/common/items/npc_weapons/biped_small/haniwa/gnoll_staff.ron b/assets/common/items/npc_weapons/biped_small/haniwa/gnoll_staff.ron index c1682cff49..1dcbea0401 100644 --- a/assets/common/items/npc_weapons/biped_small/haniwa/gnoll_staff.ron +++ b/assets/common/items/npc_weapons/biped_small/haniwa/gnoll_staff.ron @@ -1,18 +1,16 @@ ItemDef( name: "Gnoll Staff", description: "eekum bokum", - kind: Tool( - ( + kind: Tool(( kind: StaffSimple, hands: Two, - stats: ( + stats: Direct(( equip_time_millis: 0, power: 1.8, poise_strength: 0.8, speed: 0.6 - ), - ) - ), + )), + )), quality: Low, tags: [], ) diff --git a/assets/common/items/npc_weapons/biped_small/haniwa/wooden_spear.ron b/assets/common/items/npc_weapons/biped_small/haniwa/wooden_spear.ron index c794a37d0c..6b8c622c64 100644 --- a/assets/common/items/npc_weapons/biped_small/haniwa/wooden_spear.ron +++ b/assets/common/items/npc_weapons/biped_small/haniwa/wooden_spear.ron @@ -1,18 +1,16 @@ ItemDef( name: "Wooden Spear", description: "Testing", - kind: Tool( - ( + kind: Tool(( kind: Spear, hands: Two, - stats: ( + stats: Direct(( equip_time_millis: 0, power: 1.4, poise_strength: 0.8, speed: 1.0 - ), - ) - ), + )), + )), quality: Low, tags: [], ) diff --git a/assets/common/items/npc_weapons/biped_small/myrmidon/adlet_bow.ron b/assets/common/items/npc_weapons/biped_small/myrmidon/adlet_bow.ron index 15739db4f0..a0d0238b80 100644 --- a/assets/common/items/npc_weapons/biped_small/myrmidon/adlet_bow.ron +++ b/assets/common/items/npc_weapons/biped_small/myrmidon/adlet_bow.ron @@ -5,12 +5,12 @@ ItemDef( ( kind: Bow, hands: Two, - stats: ( + stats: Direct(( equip_time_millis: 0, power: 1.1, poise_strength: 0.8, speed: 0.5 - ), + )), ) ), quality: Moderate, diff --git a/assets/common/items/npc_weapons/biped_small/myrmidon/gnoll_staff.ron b/assets/common/items/npc_weapons/biped_small/myrmidon/gnoll_staff.ron index c0f890b546..ce0a8d0dea 100644 --- a/assets/common/items/npc_weapons/biped_small/myrmidon/gnoll_staff.ron +++ b/assets/common/items/npc_weapons/biped_small/myrmidon/gnoll_staff.ron @@ -5,12 +5,12 @@ ItemDef( ( kind: StaffSimple, hands: Two, - stats: ( + stats: Direct(( equip_time_millis: 0, power: 1.7, poise_strength: 0.8, speed: 0.7 - ), + )), ) ), quality: Low, diff --git a/assets/common/items/npc_weapons/biped_small/myrmidon/wooden_spear.ron b/assets/common/items/npc_weapons/biped_small/myrmidon/wooden_spear.ron index c7e97fe844..2894c9f361 100644 --- a/assets/common/items/npc_weapons/biped_small/myrmidon/wooden_spear.ron +++ b/assets/common/items/npc_weapons/biped_small/myrmidon/wooden_spear.ron @@ -5,12 +5,12 @@ ItemDef( ( kind: Spear, hands: Two, - stats: ( + stats: Direct(( equip_time_millis: 0, power: 1.7, poise_strength: 0.8, speed: 1.0 - ), + )), ) ), quality: Low, diff --git a/assets/common/items/npc_weapons/biped_small/sahagin/adlet_bow.ron b/assets/common/items/npc_weapons/biped_small/sahagin/adlet_bow.ron index 7312c4e987..ce348f0f10 100644 --- a/assets/common/items/npc_weapons/biped_small/sahagin/adlet_bow.ron +++ b/assets/common/items/npc_weapons/biped_small/sahagin/adlet_bow.ron @@ -5,12 +5,12 @@ ItemDef( ( kind: Bow, hands: Two, - stats: ( + stats: Direct(( equip_time_millis: 0, power: 1.1, poise_strength: 0.8, speed: 0.3 - ), + )), ) ), quality: Moderate, diff --git a/assets/common/items/npc_weapons/biped_small/sahagin/gnoll_staff.ron b/assets/common/items/npc_weapons/biped_small/sahagin/gnoll_staff.ron index 412f505250..435ac291ff 100644 --- a/assets/common/items/npc_weapons/biped_small/sahagin/gnoll_staff.ron +++ b/assets/common/items/npc_weapons/biped_small/sahagin/gnoll_staff.ron @@ -5,12 +5,12 @@ ItemDef( ( kind: StaffSimple, hands: Two, - stats: ( + stats: Direct(( equip_time_millis: 0, power: 1.1, poise_strength: 0.8, speed: 0.8 - ), + )), ) ), quality: Low, diff --git a/assets/common/items/npc_weapons/biped_small/sahagin/wooden_spear.ron b/assets/common/items/npc_weapons/biped_small/sahagin/wooden_spear.ron index f1e5c4444b..b346ba2068 100644 --- a/assets/common/items/npc_weapons/biped_small/sahagin/wooden_spear.ron +++ b/assets/common/items/npc_weapons/biped_small/sahagin/wooden_spear.ron @@ -5,12 +5,12 @@ ItemDef( ( kind: Spear, hands: Two, - stats: ( + stats: Direct(( equip_time_millis: 0, power: 1.1, poise_strength: 0.8, speed: 1.0 - ), + )), ) ), quality: Low, diff --git a/assets/common/items/npc_weapons/hammer/yeti_hammer.ron b/assets/common/items/npc_weapons/hammer/yeti_hammer.ron index ce90851af9..bc8bdd9f16 100644 --- a/assets/common/items/npc_weapons/hammer/yeti_hammer.ron +++ b/assets/common/items/npc_weapons/hammer/yeti_hammer.ron @@ -5,12 +5,12 @@ ItemDef( ( kind: HammerSimple, hands: Two, - stats: ( + stats: Direct(( equip_time_millis: 0, power: 2.0, poise_strength: 1.00, speed: 1.0 - ), + )), ) ), quality: Low, diff --git a/assets/common/items/npc_weapons/unique/tidal_claws.ron b/assets/common/items/npc_weapons/unique/tidal_claws.ron index 9dc06103ad..4d8bf64ec5 100644 --- a/assets/common/items/npc_weapons/unique/tidal_claws.ron +++ b/assets/common/items/npc_weapons/unique/tidal_claws.ron @@ -5,12 +5,12 @@ ItemDef( ( kind: Unique(TidalClaws), hands: Two, - stats: ( + stats: Direct(( equip_time_millis: 500, power: 1.00, poise_strength: 1.00, speed: 1.0, - ), + )), ) ), quality: Low, diff --git a/assets/common/items/npc_weapons/unique/wendigo_magic.ron b/assets/common/items/npc_weapons/unique/wendigo_magic.ron index 4778a42655..3892f757d0 100644 --- a/assets/common/items/npc_weapons/unique/wendigo_magic.ron +++ b/assets/common/items/npc_weapons/unique/wendigo_magic.ron @@ -5,12 +5,12 @@ ItemDef( ( kind: Unique(WendigoMagic), hands: Two, - stats: ( + stats: Direct(( equip_time_millis: 500, power: 1.00, poise_strength: 1.00, speed: 1.0, - ), + )), ) ), quality: Low, diff --git a/common/src/states/basic_beam.rs b/common/src/states/basic_beam.rs index 3a740dcb22..844d6b9d11 100644 --- a/common/src/states/basic_beam.rs +++ b/common/src/states/basic_beam.rs @@ -163,20 +163,16 @@ impl CharacterBehavior for Data { }; // Gets offsets let body_offsets = match data.body { - Body::Humanoid(_) => { - Vec3::new( - data.body.radius() + 2.0 * data.inputs.look_dir.x, - data.body.radius() + 2.0 * data.inputs.look_dir.y, - data.body.eye_height(), - ) * 0.55 - }, - _ => { - Vec3::new( - data.body.radius() * 3.0 * data.inputs.look_dir.x, - data.body.radius() * 3.0 * data.inputs.look_dir.y, - data.body.eye_height(), - ) * 0.55 - }, + Body::Humanoid(_) => Vec3::new( + (data.body.radius() + 2.0) * data.inputs.look_dir.x, + (data.body.radius() + 2.0) * data.inputs.look_dir.y, + data.body.eye_height() * 0.55, + ), + _ => Vec3::new( + (data.body.radius() + 3.0) * data.inputs.look_dir.x, + (data.body.radius() + 3.0) * data.inputs.look_dir.y, + data.body.eye_height() * 0.55, + ), }; let pos = Pos(data.pos.0 + body_offsets); // Create beam segment diff --git a/voxygen/src/scene/figure/load.rs b/voxygen/src/scene/figure/load.rs index d4cf724d16..6aca80bb7f 100644 --- a/voxygen/src/scene/figure/load.rs +++ b/voxygen/src/scene/figure/load.rs @@ -1219,7 +1219,7 @@ impl QuadrupedSmallLateralSpec { return load_mesh("not_found", Vec3::new(-5.0, -5.0, -2.5)); }, }; - let lateral = graceful_load_segment_flipped(&spec.left_front.lateral.0); + let lateral = graceful_load_segment_flipped(&spec.left_front.lateral.0, true); (lateral, Vec3::from(spec.left_front.offset)) } @@ -1251,7 +1251,7 @@ impl QuadrupedSmallLateralSpec { return load_mesh("not_found", Vec3::new(-5.0, -5.0, -2.5)); }, }; - let lateral = graceful_load_segment_flipped(&spec.left_back.lateral.0); + let lateral = graceful_load_segment_flipped(&spec.left_back.lateral.0, true); (lateral, Vec3::from(spec.left_back.offset)) } @@ -1511,7 +1511,7 @@ impl QuadrupedMediumLateralSpec { return load_mesh("not_found", Vec3::new(-5.0, -5.0, -2.5)); }, }; - let lateral = graceful_load_segment_flipped(&spec.leg_fl.lateral.0); + let lateral = graceful_load_segment_flipped(&spec.leg_fl.lateral.0, true); (lateral, Vec3::from(spec.leg_fl.offset)) } @@ -1543,7 +1543,7 @@ impl QuadrupedMediumLateralSpec { return load_mesh("not_found", Vec3::new(-5.0, -5.0, -2.5)); }, }; - let lateral = graceful_load_segment_flipped(&spec.leg_bl.lateral.0); + let lateral = graceful_load_segment_flipped(&spec.leg_bl.lateral.0, true); (lateral, Vec3::from(spec.leg_bl.offset)) } @@ -1575,7 +1575,7 @@ impl QuadrupedMediumLateralSpec { return load_mesh("not_found", Vec3::new(-5.0, -5.0, -2.5)); }, }; - let lateral = graceful_load_segment_flipped(&spec.foot_fl.lateral.0); + let lateral = graceful_load_segment_flipped(&spec.foot_fl.lateral.0, true); (lateral, Vec3::from(spec.foot_fl.offset)) } @@ -1607,7 +1607,7 @@ impl QuadrupedMediumLateralSpec { return load_mesh("not_found", Vec3::new(-5.0, -5.0, -2.5)); }, }; - let lateral = graceful_load_segment_flipped(&spec.foot_bl.lateral.0); + let lateral = graceful_load_segment_flipped(&spec.foot_bl.lateral.0, true); (lateral, Vec3::from(spec.foot_bl.offset)) } @@ -1771,7 +1771,7 @@ impl BirdMediumLateralSpec { return load_mesh("not_found", Vec3::new(-5.0, -5.0, -2.5)); }, }; - let lateral = graceful_load_segment_flipped(&spec.wing_l.lateral.0); + let lateral = graceful_load_segment_flipped(&spec.wing_l.lateral.0, true); (lateral, Vec3::from(spec.wing_l.offset)) } @@ -1803,7 +1803,7 @@ impl BirdMediumLateralSpec { return load_mesh("not_found", Vec3::new(-5.0, -5.0, -2.5)); }, }; - let lateral = graceful_load_segment_flipped(&spec.foot_l.lateral.0); + let lateral = graceful_load_segment_flipped(&spec.foot_l.lateral.0, true); (lateral, Vec3::from(spec.foot_l.offset)) } @@ -2052,7 +2052,7 @@ impl TheropodLateralSpec { return load_mesh("not_found", Vec3::new(-5.0, -5.0, -2.5)); }, }; - let lateral = graceful_load_segment_flipped(&spec.hand_l.lateral.0); + let lateral = graceful_load_segment_flipped(&spec.hand_l.lateral.0, true); (lateral, Vec3::from(spec.hand_l.offset)) } @@ -2084,7 +2084,7 @@ impl TheropodLateralSpec { return load_mesh("not_found", Vec3::new(-5.0, -5.0, -2.5)); }, }; - let lateral = graceful_load_segment_flipped(&spec.leg_l.lateral.0); + let lateral = graceful_load_segment_flipped(&spec.leg_l.lateral.0, true); (lateral, Vec3::from(spec.leg_l.offset)) } @@ -2116,7 +2116,7 @@ impl TheropodLateralSpec { return load_mesh("not_found", Vec3::new(-5.0, -5.0, -2.5)); }, }; - let lateral = graceful_load_segment_flipped(&spec.foot_l.lateral.0); + let lateral = graceful_load_segment_flipped(&spec.foot_l.lateral.0, true); (lateral, Vec3::from(spec.foot_l.offset)) } @@ -2310,7 +2310,7 @@ impl FishMediumLateralSpec { return load_mesh("not_found", Vec3::new(-5.0, -5.0, -2.5)); }, }; - let lateral = graceful_load_segment_flipped(&spec.fin_l.lateral.0); + let lateral = graceful_load_segment_flipped(&spec.fin_l.lateral.0, true); (lateral, Vec3::from(spec.fin_l.offset)) } @@ -2445,7 +2445,7 @@ impl FishSmallLateralSpec { return load_mesh("not_found", Vec3::new(-5.0, -5.0, -2.5)); }, }; - let lateral = graceful_load_segment_flipped(&spec.fin_l.lateral.0); + let lateral = graceful_load_segment_flipped(&spec.fin_l.lateral.0, true); (lateral, Vec3::from(spec.fin_l.offset)) } @@ -2536,7 +2536,7 @@ make_vox_spec!( }), tool.and_then(|tool| tool.active.as_ref()).map(|tool| { spec.weapon.read().0.mesh_main( - tool, + &tool.name, false, ) }), @@ -2662,7 +2662,7 @@ impl BipedSmallArmorHandSpec { }; let hand_segment = if flipped { - graceful_load_segment_flipped(&spec.left.vox_spec.0) + graceful_load_segment_flipped(&spec.left.vox_spec.0, true) } else { graceful_load_segment(&spec.right.vox_spec.0) }; @@ -2694,7 +2694,7 @@ impl BipedSmallArmorFootSpec { }; let foot_segment = if flipped { - graceful_load_segment_flipped(&spec.left.vox_spec.0) + graceful_load_segment_flipped(&spec.left.vox_spec.0, true) } else { graceful_load_segment(&spec.right.vox_spec.0) }; @@ -2723,7 +2723,7 @@ impl BipedSmallWeaponSpec { }; let tool_kind_segment = if flipped { - graceful_load_segment_flipped(&spec.vox_spec.0) + graceful_load_segment_flipped(&spec.vox_spec.0, true) } else { graceful_load_segment(&spec.vox_spec.0) }; @@ -3244,7 +3244,7 @@ make_vox_spec!( )), tool.and_then(|tool| tool.active.as_ref()).map(|tool| { spec.weapon.read().0.mesh_main( - tool, + &tool.name, false, ) }), @@ -3526,7 +3526,7 @@ impl BipedLargeWeaponSpec { }; let tool_kind_segment = if flipped { - graceful_load_segment_flipped(&spec.vox_spec.0) + graceful_load_segment_flipped(&spec.vox_spec.0, true) } else { graceful_load_segment(&spec.vox_spec.0) }; @@ -4043,7 +4043,7 @@ impl QuadrupedLowLateralSpec { return load_mesh("not_found", Vec3::new(-5.0, -5.0, -2.5)); }, }; - let lateral = graceful_load_segment_flipped(&spec.front_left.lateral.0); + let lateral = graceful_load_segment_flipped(&spec.front_left.lateral.0, true); (lateral, Vec3::from(spec.front_left.offset)) } @@ -4075,7 +4075,7 @@ impl QuadrupedLowLateralSpec { return load_mesh("not_found", Vec3::new(-5.0, -5.0, -2.5)); }, }; - let lateral = graceful_load_segment_flipped(&spec.back_left.lateral.0); + let lateral = graceful_load_segment_flipped(&spec.back_left.lateral.0, true); (lateral, Vec3::from(spec.back_left.offset)) } diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index 0cf66bbbbc..68cde78921 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -2548,7 +2548,7 @@ impl FigureMgr { tick, player_camera_mode, player_character_state, - scene_data.thread_pool, + scene_data.runtime, ); let state = self diff --git a/voxygen/src/scene/particle.rs b/voxygen/src/scene/particle.rs index 95c36b1fe3..efd3d3de8e 100644 --- a/voxygen/src/scene/particle.rs +++ b/voxygen/src/scene/particle.rs @@ -399,7 +399,7 @@ impl ParticleMgr { .join() .filter(|(_, _, b)| b.creation.map_or(true, |c| (c + dt as f64) >= time)) { -// + // let range = beam.properties.speed * beam.properties.duration.as_secs_f32(); if beam .properties @@ -410,65 +410,64 @@ impl ParticleMgr { // Emit a light when using healing lights.push(Light::new(pos.0, Rgb::new(0.1, 1.0, 0.15), 1.0)); for i in 0..self.scheduler.heartbeats(Duration::from_millis(1)) { - self.particles.push(Particle::new_beam( + self.particles.push(Particle::new_directed( beam.properties.duration, time + i as f64 / 1000.0, ParticleMode::HealingBeam, pos.0, pos.0 + *ori.look_dir() * range, )); -// - if let CharacterState::BasicBeam(b) = character_state { - let particle_ori = b.particle_ori.unwrap_or_else(|| ori.look_vec()); - if b.stage_section == StageSection::Cast { - if b.static_data.base_hps > 0.0 { - // Emit a light when using healing - lights.push(Light::new(pos.0 + b.offset, Rgb::new(0.1, 1.0, 0.15), 1.0)); - for i in 0..self.scheduler.heartbeats(Duration::from_millis(1)) { - self.particles.push(Particle::new_directed( - b.static_data.beam_duration, - time + i as f64 / 1000.0, - ParticleMode::HealingBeam, - pos.0 + particle_ori * 0.5 + b.offset, - pos.0 + particle_ori * b.static_data.range + b.offset, - )); - } - } else { - let mut rng = thread_rng(); - let (from, to) = (Vec3::::unit_z(), particle_ori); - let m = Mat3::::rotation_from_to_3d(from, to); - // Emit a light when using flames - lights.push(Light::new( - pos.0 + b.offset, - Rgb::new(1.0, 0.25, 0.05).map(|e| e * rng.gen_range(0.8..1.2)), - 2.0, - )); - self.particles.resize_with( - self.particles.len() - + 2 * usize::from( - self.scheduler.heartbeats(Duration::from_millis(1)), - ), - || { - let phi: f32 = - rng.gen_range(0.0..b.static_data.max_angle.to_radians()); - let theta: f32 = rng.gen_range(0.0..2.0 * PI); - let offset_z = Vec3::new( - phi.sin() * theta.cos(), - phi.sin() * theta.sin(), - phi.cos(), - ); - let random_ori = offset_z * m * Vec3::new(-1.0, -1.0, 1.0); - Particle::new_directed( - b.static_data.beam_duration, - time, - ParticleMode::FlameThrower, - pos.0 + random_ori * 0.5 + b.offset, - pos.0 + random_ori * b.static_data.range + b.offset, - ) - }, - ); - } -// + /* + if let CharacterState::BasicBeam(b) = character_state { + if b.stage_section == StageSection::Cast { + if b.static_data.base_hps > 0.0 {// + // Emit a light when using healing + lights.push(Light::new(pos.0 + b.offset, Rgb::new(0.1, 1.0, 0.15), 1.0)); + for i in 0..self.scheduler.heartbeats(Duration::from_millis(1)) { + self.particles.push(Particle::new_directed( + b.static_data.beam_duration, + time + i as f64 / 1000.0, + ParticleMode::HealingBeam, + pos.0 + particle_ori * 0.5 + b.offset, + pos.0 + particle_ori * b.static_data.range + b.offset, + )); + } + } else { + let mut rng = thread_rng(); + let (from, to) = (Vec3::::unit_z(), particle_ori); + let m = Mat3::::rotation_from_to_3d(from, to); + // Emit a light when using flames + lights.push(Light::new( + pos.0 + b.offset, + Rgb::new(1.0, 0.25, 0.05).map(|e| e * rng.gen_range(0.8..1.2)), + 2.0, + )); + self.particles.resize_with( + self.particles.len() + + 2 * usize::from( + self.scheduler.heartbeats(Duration::from_millis(1)), + ), + || { + let phi: f32 = + rng.gen_range(0.0..b.static_data.max_angle.to_radians()); + let theta: f32 = rng.gen_range(0.0..2.0 * PI); + let offset_z = Vec3::new( + phi.sin() * theta.cos(), + phi.sin() * theta.sin(), + phi.cos(), + ); + let random_ori = offset_z * m * Vec3::new(-1.0, -1.0, 1.0); + Particle::new_directed( + b.static_data.beam_duration, + time, + ParticleMode::FlameThrower, + pos.0 + random_ori * 0.5 + b.offset, + pos.0 + random_ori * b.static_data.range + b.offset, + ) + }, + ); + } + */ } } else { let mut rng = thread_rng(); @@ -484,16 +483,16 @@ impl ParticleMgr { self.particles.len() + 2 * usize::from(self.scheduler.heartbeats(Duration::from_millis(1))), || { - let phi: f32 = rng.gen_range(0.0..beam.properties.angle.to_radians()); + let phi: f32 = rng.gen_range(0.0..beam.properties.angle); let theta: f32 = rng.gen_range(0.0..2.0 * PI); let offset_z = Vec3::new(phi.sin() * theta.cos(), phi.sin() * theta.sin(), phi.cos()); let random_ori = offset_z * m * Vec3::new(-1.0, -1.0, 1.0); - Particle::new_beam( + Particle::new_directed( beam.properties.duration, time, ParticleMode::FlameThrower, - pos.0 + random_ori, + pos.0, /* + random_ori */ pos.0 + random_ori * range, ) }, diff --git a/world/src/site/dungeon/mod.rs b/world/src/site/dungeon/mod.rs index a59ec1ce0a..0d332df7e2 100644 --- a/world/src/site/dungeon/mod.rs +++ b/world/src/site/dungeon/mod.rs @@ -619,7 +619,7 @@ impl Floor { ) .with_loot_drop(comp::Item::new_from_asset_expect(chosen)) .with_main_tool(comp::Item::new_from_asset_expect( - match dynamic_rng.gen_range(0..3) { + match dynamic_rng.gen_range(0..5) { 0 => { "common.items.npc_weapons.biped_small.gnarling.\ adlet_bow" @@ -648,7 +648,7 @@ impl Floor { ) .with_loot_drop(comp::Item::new_from_asset_expect(chosen)) .with_main_tool(comp::Item::new_from_asset_expect( - match dynamic_rng.gen_range(0..3) { + match dynamic_rng.gen_range(0..5) { 0 => "common.items.npc_weapons.biped_small.adlet.adlet_bow", 1 => { "common.items.npc_weapons.biped_small.adlet.gnoll_staff" @@ -673,7 +673,7 @@ impl Floor { ) .with_loot_drop(comp::Item::new_from_asset_expect(chosen)) .with_main_tool(comp::Item::new_from_asset_expect( - match dynamic_rng.gen_range(0..3) { + match dynamic_rng.gen_range(0..5) { 0 => { "common.items.npc_weapons.biped_small.sahagin.adlet_bow" }, @@ -701,7 +701,7 @@ impl Floor { ) .with_loot_drop(comp::Item::new_from_asset_expect(chosen)) .with_main_tool(comp::Item::new_from_asset_expect( - match dynamic_rng.gen_range(0..3) { + match dynamic_rng.gen_range(0..5) { 0 => { "common.items.npc_weapons.biped_small.haniwa.adlet_bow" }, @@ -729,7 +729,7 @@ impl Floor { ) .with_loot_drop(comp::Item::new_from_asset_expect(chosen)) .with_main_tool(comp::Item::new_from_asset_expect( - match dynamic_rng.gen_range(0..3) { + match dynamic_rng.gen_range(0..5) { 0 => { "common.items.npc_weapons.biped_small.myrmidon.\ adlet_bow"