diff --git a/src/visibility.rs b/src/visibility.rs index 9332b6b..754dcc9 100644 --- a/src/visibility.rs +++ b/src/visibility.rs @@ -44,6 +44,7 @@ impl Viewshed { pub fn is_point_visible(&self, point: &dyn PointLike) -> bool { self.visible_points.contains(&point.into()) } + fn update( &mut self, viewer_entity: &Entity, @@ -79,7 +80,7 @@ impl Viewshed { let mut entities = HashSet::new(); let shape_pos = (Vec2::new(coord.x as f32 + 0.5, coord.y as f32 + 0.5), 0.); let dest = point!(coord.x as f32 + 0.5, coord.y as f32 + 0.5); - if na::distance(&origin, &dest) >= self.range as f32 { + if na::distance(&origin, &dest) > self.range as f32 { return u8::MAX; } let mut opacity = 0;