diff --git a/common/src/comp/ability.rs b/common/src/comp/ability.rs index 1541f56eb4..20af926a83 100644 --- a/common/src/comp/ability.rs +++ b/common/src/comp/ability.rs @@ -944,7 +944,7 @@ impl From<(&CharacterAbility, AbilityKey)> for CharacterState { timer: Duration::default(), stage_section: StageSection::Buildup, particle_ori: None::>, - offset: 0.0, + offset: Vec3::zero(), }), } } diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs index 317af58d3a..62f358d3f9 100644 --- a/common/src/comp/body.rs +++ b/common/src/comp/body.rs @@ -546,7 +546,11 @@ impl Body { (humanoid::Species::Danari, humanoid::BodyType::Male) => 0.696, (humanoid::Species::Danari, humanoid::BodyType::Female) => 0.696, }, - Body::BipedLarge(_) => 2.5, + Body::BipedLarge(biped_large) => match (biped_large.species, biped_large.body_type) { + (biped_large::Species::Occultsaurok, _) => 2.0, + (biped_large::Species::Slysaurok, _) => 2.0, + _ => 2.2, + }, Body::BirdMedium(_) => 0.7, Body::Dragon(_) => 16.0, Body::Golem(_) => 2.0, diff --git a/common/src/states/basic_beam.rs b/common/src/states/basic_beam.rs index 896c75b378..5790aa5726 100644 --- a/common/src/states/basic_beam.rs +++ b/common/src/states/basic_beam.rs @@ -54,7 +54,7 @@ pub struct Data { /// Used for particle stuffs pub particle_ori: Option>, /// Used to offset beam and particles - pub offset: f32, + pub offset: Vec3, } impl CharacterBehavior for Data { @@ -88,15 +88,16 @@ impl CharacterBehavior for Data { tick_dur: Duration::from_secs_f32(1.0 / self.static_data.tick_rate), timer: Duration::default(), }); - // Gets offset - let eye_height = data.body.eye_height(); + // Gets offsets + let body_offsets = + Vec3::new(data.body.radius() * 3.0, 0.0, data.body.eye_height()); // Build up update.character = CharacterState::BasicBeam(Data { timer: Duration::default(), stage_section: StageSection::Cast, particle_ori: Some(*data.inputs.look_dir), - offset: eye_height * 0.55, + offset: body_offsets * 0.55, ..*self }); } @@ -132,7 +133,10 @@ impl CharacterBehavior for Data { duration: self.static_data.beam_duration, owner: Some(*data.uid), }; - let pos = Pos(data.pos.0 + Vec3::new(0.0, 0.0, self.offset)); + // Gets offsets + let body_offsets = + Vec3::new(data.body.radius() * 3.0, 0.0, data.body.eye_height()); + let pos = Pos(data.pos.0 + body_offsets); // Create beam segment update.server_events.push_front(ServerEvent::BeamSegment { properties, diff --git a/voxygen/src/scene/particle.rs b/voxygen/src/scene/particle.rs index e757a727f6..f457110d76 100644 --- a/voxygen/src/scene/particle.rs +++ b/voxygen/src/scene/particle.rs @@ -375,10 +375,8 @@ impl ParticleMgr { b.static_data.beam_duration, time + i as f64 / 1000.0, ParticleMode::HealingBeam, - pos.0 + particle_ori * 0.5 + Vec3::new(0.0, 0.0, b.offset), - pos.0 - + particle_ori * b.static_data.range - + Vec3::new(0.0, 0.0, b.offset), + pos.0 + particle_ori * 0.5 + b.offset, + pos.0 + particle_ori * b.static_data.range + b.offset, )); } } else { @@ -404,10 +402,8 @@ impl ParticleMgr { b.static_data.beam_duration, time, ParticleMode::FlameThrower, - pos.0 + random_ori * 0.5 + Vec3::new(0.0, 0.0, b.offset), - pos.0 - + random_ori * b.static_data.range - + Vec3::new(0.0, 0.0, b.offset), + pos.0 + random_ori * 0.5 + b.offset, + pos.0 + random_ori * b.static_data.range + b.offset, ) }, );