diff --git a/common/src/states/basic_beam.rs b/common/src/states/basic_beam.rs index 045bf1a86b..4b6d5a3fc9 100644 --- a/common/src/states/basic_beam.rs +++ b/common/src/states/basic_beam.rs @@ -3,7 +3,7 @@ use crate::{ Attack, AttackDamage, AttackEffect, CombatEffect, CombatRequirement, Damage, DamageSource, GroupTarget, }, - comp::{beam, Body, CharacterState, EnergyChange, EnergySource, Ori, Pos, StateUpdate}, + comp::{beam, CharacterState, EnergyChange, EnergySource, Ori, Pos, StateUpdate}, event::ServerEvent, states::{ behavior::{CharacterBehavior, JoinData}, @@ -146,18 +146,11 @@ impl CharacterBehavior for Data { specifier: self.static_data.specifier, }; // 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, - ), - }; + let body_offsets = Vec3::new( + (data.body.radius() + 1.0) * data.inputs.look_dir.x, + (data.body.radius() + 1.0) * data.inputs.look_dir.y, + data.body.eye_height() * 0.6, + ); let pos = Pos(data.pos.0 + body_offsets); // Create beam segment update.server_events.push_front(ServerEvent::BeamSegment { diff --git a/common/src/states/healing_beam.rs b/common/src/states/healing_beam.rs index e5a6806ac5..f5c950428e 100644 --- a/common/src/states/healing_beam.rs +++ b/common/src/states/healing_beam.rs @@ -1,6 +1,6 @@ use crate::{ combat::{Attack, AttackEffect, CombatEffect, CombatRequirement, GroupTarget}, - comp::{beam, Body, CharacterState, Ori, Pos, StateUpdate}, + comp::{beam, CharacterState, Ori, Pos, StateUpdate}, event::ServerEvent, states::{ behavior::{CharacterBehavior, JoinData}, @@ -111,18 +111,11 @@ impl CharacterBehavior for Data { specifier: self.static_data.specifier, }; // 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, - ), - }; + let body_offsets = Vec3::new( + (data.body.radius() + 1.0) * data.inputs.look_dir.x, + (data.body.radius() + 1.0) * data.inputs.look_dir.y, + data.body.eye_height() * 0.6, + ); let pos = Pos(data.pos.0 + body_offsets); // Create beam segment update.server_events.push_front(ServerEvent::BeamSegment { diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index e4d0a9af31..f02effb9f1 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -1252,6 +1252,32 @@ impl FigureMgr { skeleton_attr, ) }, + CharacterState::HealingBeam(s) => { + let stage_time = s.timer.as_secs_f32(); + let stage_progress = match s.stage_section { + StageSection::Buildup => { + stage_time / s.static_data.buildup_duration.as_secs_f32() + }, + StageSection::Cast => s.timer.as_secs_f32(), + StageSection::Recover => { + stage_time / s.static_data.recover_duration.as_secs_f32() + }, + _ => 0.0, + }; + anim::character::BeamAnimation::update_skeleton( + &target_base, + ( + active_tool_kind, + second_tool_kind, + time, + vel.0.magnitude(), + Some(s.stage_section), + ), + stage_progress, + &mut state_animation_rate, + skeleton_attr, + ) + }, CharacterState::ComboMelee(s) => { let stage_index = (s.stage - 1) as usize; let stage_time = s.timer.as_secs_f32();