diff --git a/src/config/visuals.rs b/src/config/visuals.rs index a77e679..4a05860 100644 --- a/src/config/visuals.rs +++ b/src/config/visuals.rs @@ -1,7 +1,6 @@ pub const NON_VISIBLE_MULTIPLIER: f32 = 0.3; -pub const MAX_DARKENING: f32 = 0.3; -pub const START_DARKEN_AT_N_TILES: f32 = 9.0; -pub const MAX_DARKEN_AT_N_TILES: f32 = 12.0; +pub const MAX_DARKENING: f32 = 0.45; +pub const START_DARKEN_AT_N_TILES: f32 = 8.0; pub const SHORT_PARTICLE_LIFETIME: f32 = 100.0; pub const DEFAULT_PARTICLE_LIFETIME: f32 = 200.0; diff --git a/src/map/themes.rs b/src/map/themes.rs index 64f11a0..78e2786 100644 --- a/src/map/themes.rs +++ b/src/map/themes.rs @@ -22,15 +22,22 @@ pub fn get_tile_renderables_for_id(idx: usize, map: &Map, other_pos: Option f32 { let distance = DistanceAlg::Pythagoras.distance2d(pos, other_pos) as f32; // Get distance in tiles. let interp_factor = (distance - START_DARKEN_AT_N_TILES) / - (MAX_DARKEN_AT_N_TILES * (crate::config::entity::DEFAULT_VIEWSHED_STANDARD as f32) - START_DARKEN_AT_N_TILES); + ((crate::config::entity::DEFAULT_VIEWSHED_STANDARD as f32) - START_DARKEN_AT_N_TILES); let interp_factor = interp_factor.max(0.0).min(1.0); // Clamp [0-1] return 1.0 - interp_factor * (1.0 - MAX_DARKENING); }