diff --git a/assets/common/abilities/custom/claygolem/rocket.ron b/assets/common/abilities/custom/claygolem/rocket.ron index 8095777128..2ac6c020e5 100644 --- a/assets/common/abilities/custom/claygolem/rocket.ron +++ b/assets/common/abilities/custom/claygolem/rocket.ron @@ -9,5 +9,5 @@ BasicRanged( ), projectile_body: Object(ClayRocket), projectile_light: None, - projectile_speed: 20.0, + projectile_speed: 30.0, ) diff --git a/common/src/states/basic_beam.rs b/common/src/states/basic_beam.rs index ca87e53375..39c4c28562 100644 --- a/common/src/states/basic_beam.rs +++ b/common/src/states/basic_beam.rs @@ -140,24 +140,26 @@ impl CharacterBehavior for Data { owner: Some(*data.uid), specifier: self.static_data.specifier, }; + // Gets offsets + let body_offsets_r = data.body.radius() + 1.0; let body_offsets_z = match data.body { - Body::BirdLarge(_) | Body::Golem(_) => data.body.height() * 0.8, + Body::BirdLarge(_) => data.body.height() * 0.8, + Body::Golem(_) => data.body.height() * 0.9 + data.inputs.look_dir.z * 3.0, _ => data.body.height() * 0.5, }; - // Gets offsets let (body_offsets, ori) = match self.static_data.orientation_behavior { OrientationBehavior::Normal | OrientationBehavior::Turret => ( Vec3::new( - (data.body.radius() + 1.0) * data.inputs.look_dir.x, - (data.body.radius() + 1.0) * data.inputs.look_dir.y, + body_offsets_r * data.inputs.look_dir.x, + body_offsets_r * data.inputs.look_dir.y, body_offsets_z, ), Ori::from(data.inputs.look_dir), ), OrientationBehavior::FromOri => ( Vec3::new( - (data.body.radius() + 1.0) * update.ori.look_vec().x, - (data.body.radius() + 1.0) * update.ori.look_vec().y, + body_offsets_r * update.ori.look_vec().x, + body_offsets_r * update.ori.look_vec().y, body_offsets_z, ), Ori::from(Vec3::new( diff --git a/server/src/events/entity_creation.rs b/server/src/events/entity_creation.rs index 78aa93f131..a1f284049a 100644 --- a/server/src/events/entity_creation.rs +++ b/server/src/events/entity_creation.rs @@ -187,11 +187,15 @@ pub fn handle_shoot( .write_resource::>() .push(Outcome::ProjectileShot { pos, body, vel }); - let eye_height = state - .ecs() - .read_storage::() - .get(entity) - .map_or(0.0, |b| b.eye_height()); + let eye_height = + state + .ecs() + .read_storage::() + .get(entity) + .map_or(0.0, |b| match b { + comp::Body::Golem(_) => b.height() * 0.45, + _ => b.eye_height(), + }); pos.z += eye_height; diff --git a/server/src/sys/agent.rs b/server/src/sys/agent.rs index b88418221b..9b0812edb7 100644 --- a/server/src/sys/agent.rs +++ b/server/src/sys/agent.rs @@ -1649,7 +1649,7 @@ impl<'a> AgentData<'a> { ) } Tactic::ClayGolem if matches!(self.char_state, CharacterState::BasicRanged(_)) => { - const ROCKET_SPEED: f32 = 20.0; + const ROCKET_SPEED: f32 = 30.0; aim_projectile( ROCKET_SPEED, Vec3::new(self.pos.0.x, self.pos.0.y, self.pos.0.z + eye_offset), @@ -3508,6 +3508,7 @@ impl<'a> AgentData<'a> { tgt_data.pos, attack_data.dist_sqrd, ) + && attack_data.angle < 45.0 { // If target in range threshold and haven't been lasering for more than 10 // seconds already or if target is moving slow-ish, laser them