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::<Path>()
|
||||||
.register_type::<CostMap>()
|
.register_type::<CostMap>()
|
||||||
.add_systems(
|
.add_systems(
|
||||||
PreUpdate,
|
FixedPreUpdate,
|
||||||
(poll_tasks, apply_deferred, negotiate_path).chain(),
|
(poll_tasks, apply_deferred, negotiate_path).chain(),
|
||||||
)
|
)
|
||||||
.add_systems(
|
.add_systems(
|
||||||
|
@ -415,6 +415,6 @@ impl Plugin for PathfindingPlugin {
|
||||||
.chain()
|
.chain()
|
||||||
.after(InputManagerSystem::Tick),
|
.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) {
|
fn build(&self, app: &mut App) {
|
||||||
app.add_event::<VisibilityChanged>()
|
app.add_event::<VisibilityChanged>()
|
||||||
.add_systems(
|
.add_systems(
|
||||||
PreUpdate,
|
FixedPreUpdate,
|
||||||
(
|
(
|
||||||
add_visibility_indices::<MapData>,
|
add_visibility_indices::<MapData>,
|
||||||
update_viewshed,
|
update_viewshed,
|
||||||
update_revealed_tiles::<MapData>,
|
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