Move noncritical systems to fixed schedules.
This commit is contained in:
parent
03d963bed4
commit
65c9c6db46
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user