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::)