From 65c9c6db46c01923f5bbfa1fc0f2b62cf79a6b29 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Sat, 17 Aug 2024 11:52:54 -0400 Subject: [PATCH] Move noncritical systems to fixed schedules. --- src/pathfinding.rs | 4 ++-- src/visibility.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pathfinding.rs b/src/pathfinding.rs index 6ddfd0a..24a3a76 100644 --- a/src/pathfinding.rs +++ b/src/pathfinding.rs @@ -406,7 +406,7 @@ impl Plugin for PathfindingPlugin { .register_type::() .register_type::() .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); } } diff --git a/src/visibility.rs b/src/visibility.rs index 446181b..ba40a15 100644 --- a/src/visibility.rs +++ b/src/visibility.rs @@ -430,13 +430,13 @@ impl Plugin for VisibilityPlug fn build(&self, app: &mut App) { app.add_event::() .add_systems( - PreUpdate, + FixedPreUpdate, ( add_visibility_indices::, update_viewshed, update_revealed_tiles::, ), ) - .add_systems(PostUpdate, (log_visible, viewshed_removed, remove_visible)); + .add_systems(FixedPostUpdate, (log_visible, viewshed_removed, remove_visible)); } }