Restore timestep for visibility updates.

This commit is contained in:
Nolan Darilek 2022-03-17 11:30:12 -05:00
parent 197080e5fd
commit 92b0a92a70

View File

@ -431,7 +431,12 @@ impl<D: 'static + Clone + Default + Send + Sync> Plugin for VisibilityPlugin<D>
fn build(&self, app: &mut App) { fn build(&self, app: &mut App) {
app.add_event::<VisibilityChanged>() app.add_event::<VisibilityChanged>()
.add_system(add_visibility_indices::<D>) .add_system(add_visibility_indices::<D>)
.add_system_to_stage(CoreStage::PostUpdate, update_viewshed::<D>) .add_system_set_to_stage(
CoreStage::PostUpdate,
SystemSet::new()
.with_run_criteria(FixedTimestep::step(0.05))
.with_system(update_viewshed::<D>),
)
.add_system_to_stage(CoreStage::PostUpdate, viewshed_removed) .add_system_to_stage(CoreStage::PostUpdate, viewshed_removed)
.add_system_to_stage(CoreStage::PostUpdate, remove_visible::<D>) .add_system_to_stage(CoreStage::PostUpdate, remove_visible::<D>)
.add_system_to_stage(CoreStage::PostUpdate, update_revealed_tiles::<D>) .add_system_to_stage(CoreStage::PostUpdate, update_revealed_tiles::<D>)