Move noncritical systems to fixed schedules.

This commit is contained in:
Nolan Darilek 2024-08-17 11:52:54 -04:00
parent 03d963bed4
commit 65c9c6db46
2 changed files with 4 additions and 4 deletions

View File

@ -406,7 +406,7 @@ impl Plugin for PathfindingPlugin {
.register_type::<Path>()
.register_type::<CostMap>()
.add_systems(
PreUpdate,
FixedPreUpdate,
(poll_tasks, apply_deferred, negotiate_path).chain(),
)
.add_systems(
@ -415,6 +415,6 @@ impl Plugin for PathfindingPlugin {
.chain()
.after(InputManagerSystem::Tick),
)
.add_systems(PostUpdate, remove_destination);
.add_systems(FixedPostUpdate, remove_destination);
}
}

View File

@ -430,13 +430,13 @@ impl<MapData: 'static + Clone + Default + Send + Sync> Plugin for VisibilityPlug
fn build(&self, app: &mut App) {
app.add_event::<VisibilityChanged>()
.add_systems(
PreUpdate,
FixedPreUpdate,
(
add_visibility_indices::<MapData>,
update_viewshed,
update_revealed_tiles::<MapData>,
),
)
.add_systems(PostUpdate, (log_visible, viewshed_removed, remove_visible));
.add_systems(FixedPostUpdate, (log_visible, viewshed_removed, remove_visible));
}
}