Addressed review, changelog.

This commit is contained in:
Sam 2021-10-29 17:12:57 -04:00
parent ca292a53ea
commit aad2384622
3 changed files with 4 additions and 3 deletions

View File

@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Nerfed some skill values - Nerfed some skill values
- Tweaked critical chance of legendary weapons - Tweaked critical chance of legendary weapons
- Agents using fireball projectiles aim at the feet instead of the eyes - Agents using fireball projectiles aim at the feet instead of the eyes
- Explosions can now have a nonzero minimum falloff
### Removed ### Removed

View File

@ -567,9 +567,8 @@ pub fn handle_explosion(server: &Server, pos: Vec3<f32>, explosion: Explosion, o
0.0 0.0
} else { } else {
// Falloff inversely proportional to radius // Falloff inversely proportional to radius
let fall_off = ((horiz_dist.max(vert_distance).max(0.0) / radius).min(1.0) - 1.0).abs(); let fall_off = ((distance / radius).min(1.0) - 1.0).abs();
// Clamp min_falloff so that it doesn't produce absurd values or NaNs let min_falloff = min_falloff.clamp(0.0, 1.0);
let min_falloff = min_falloff.clamp(0.0, 0.99);
min_falloff + fall_off * (1.0 - min_falloff) min_falloff + fall_off * (1.0 - min_falloff)
} }
} }

View File

@ -1862,6 +1862,7 @@ impl<'a> AgentData<'a> {
damage: _, damage: _,
radius: _, radius: _,
energy_regen: _, energy_regen: _,
min_falloff: _,
} => 0.0, } => 0.0,
_ => tgt_eye_offset, _ => tgt_eye_offset,
}; };