diff options
Diffstat (limited to 'src/server.rs')
-rw-r--r-- | src/server.rs | 12 |
1 files 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<Time>) { } } -fn timers_ticket(mut health_regen_timer: ResMut<HealthRegenTimer>, time: Res<Time>) { +fn timers_tick(mut health_regen_timer: ResMut<HealthRegenTimer>, time: Res<Time>) { health_regen_timer.0.tick(time.delta()); } |