From 6362c0df32938289ceec517bb4198f84c5cb989a Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Mon, 25 Oct 2021 12:00:02 +0000 Subject: [PATCH] Fixed non-character point lights --- voxygen/src/scene/mod.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/voxygen/src/scene/mod.rs b/voxygen/src/scene/mod.rs index e56a3a9c35..3f69f0dfe6 100644 --- a/voxygen/src/scene/mod.rs +++ b/voxygen/src/scene/mod.rs @@ -560,7 +560,11 @@ impl Scene { .state .ecs() .read_storage::(), - &scene_data.state.ecs().read_storage::(), + scene_data + .state + .ecs() + .read_storage::() + .maybe(), ) .join() .filter(|(pos, _, light_anim, h)| { @@ -568,7 +572,7 @@ impl Scene { && light_anim.strength > 0.0 && (pos.0.distance_squared(player_pos) as f32) < loaded_distance.powi(2) + LIGHT_DIST_RADIUS - && !h.is_dead + && h.map_or(true, |h| !h.is_dead) }) .map(|(pos, interpolated, light_anim, _)| { // Use interpolated values if they are available