From 92b0a92a7014d52c1232c68c05335fca46dfcce3 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Thu, 17 Mar 2022 11:30:12 -0500 Subject: [PATCH] Restore timestep for visibility updates. --- src/visibility.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/visibility.rs b/src/visibility.rs index 0fb4d66..de3d3d8 100644 --- a/src/visibility.rs +++ b/src/visibility.rs @@ -431,7 +431,12 @@ impl Plugin for VisibilityPlugin fn build(&self, app: &mut App) { app.add_event::() .add_system(add_visibility_indices::) - .add_system_to_stage(CoreStage::PostUpdate, update_viewshed::) + .add_system_set_to_stage( + CoreStage::PostUpdate, + SystemSet::new() + .with_run_criteria(FixedTimestep::step(0.05)) + .with_system(update_viewshed::), + ) .add_system_to_stage(CoreStage::PostUpdate, viewshed_removed) .add_system_to_stage(CoreStage::PostUpdate, remove_visible::) .add_system_to_stage(CoreStage::PostUpdate, update_revealed_tiles::)