From e40eab9143fd881add48aba1e4ea1e1283c72cff Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Mon, 18 Mar 2024 02:40:12 +0100 Subject: chore: run server systems in `fixed update` --- src/server.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/server.rs b/src/server.rs index 7d50d9f..6a22755 100644 --- a/src/server.rs +++ b/src/server.rs @@ -51,10 +51,10 @@ impl Plugin for ServerPlugin { .add_systems(Startup, setup) .add_systems(Update, (connects, disconnects)) .add_systems(Update, receive_message) - .add_systems(Update, timers_ticket) - .add_systems(Update, health_regen.after(timers_ticket)) + .add_systems(FixedUpdate, timers_tick) + .add_systems(FixedUpdate, health_regen.after(timers_tick)) .add_systems( - Update, + FixedUpdate, ( (imperative_attack_approach, imperative_attack_attack) .chain() @@ -64,14 +64,14 @@ impl Plugin for ServerPlugin { .after(player_input), ) .add_systems( - Update, + FixedUpdate, ( projectile_move.after(imperative_walk_to), projectile_despawn, ) .chain(), ) - .add_systems(Update, cooldown_decrement) + .add_systems(FixedUpdate, cooldown_decrement) .add_systems(FixedUpdate, player_input); } } @@ -444,7 +444,7 @@ fn cooldown_decrement(mut cooldowns: Query<&mut Cooldown>, time: Res