Merge branch 'zesterer-master-patch-82733' into 'master'

Fixed non-character point lights

See merge request veloren/veloren!2959
This commit is contained in:
Joshua Barretto 2021-10-25 13:44:24 +00:00
commit 8e8d1a6624

View File

@ -560,7 +560,11 @@ impl Scene {
.state
.ecs()
.read_storage::<comp::LightAnimation>(),
&scene_data.state.ecs().read_storage::<comp::Health>(),
scene_data
.state
.ecs()
.read_storage::<comp::Health>()
.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