veloren/server/src/sys/agent/consts.rs
holychowders 8d98ade15e Agent perception: Make handling of sounds and awareness more intuitive.
When a sound was received in `idle_tree()`, awareness would be
incremented, causing a call to `handle_elevated_awareness()`, which
handled sounds heard. Instead, just `handle_sounds()` when they are heard and
increment awareness as part of hearing them.

The code more straightforwardly shows the agent first hearing a sound and then
becoming more aware based on that.
2022-03-12 16:58:06 -06:00

14 lines
545 B
Rust

pub const DAMAGE_MEMORY_DURATION: f64 = 0.25;
pub const FLEE_DURATION: f32 = 3.0;
pub const MAX_FOLLOW_DIST: f32 = 12.0;
pub const MAX_PATH_DIST: f32 = 170.0;
pub const PARTIAL_PATH_DIST: f32 = 50.0;
pub const SEPARATION_DIST: f32 = 10.0;
pub const SEPARATION_BIAS: f32 = 0.8;
pub const MAX_FLEE_DIST: f32 = 20.0;
pub const AVG_FOLLOW_DIST: f32 = 6.0;
pub const RETARGETING_THRESHOLD_SECONDS: f64 = 10.0;
pub const HEALING_ITEM_THRESHOLD: f32 = 0.5;
pub const IDLE_HEALING_ITEM_THRESHOLD: f32 = 0.999;
pub const DEFAULT_ATTACK_RANGE: f32 = 2.0;