diff options
Diffstat (limited to 'src/server.rs')
-rw-r--r-- | src/server.rs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/server.rs b/src/server.rs index 6a22755..165c5f0 100644 --- a/src/server.rs +++ b/src/server.rs @@ -5,6 +5,7 @@ use crate::shared::cooldown::*; use crate::shared::health::*; use crate::shared::health_event::*; use crate::shared::imperative::*; +use crate::shared::player::*; use crate::shared::projectile::*; use crate::shared::*; use bevy::prelude::*; @@ -274,10 +275,11 @@ fn imperative_attack_attack( }; if cooldown.a_cooldown.is_zero() { cooldown.a_cooldown = Duration::from_secs_f32(1.5); - commands.spawn(ProjectileBundle { - projectile: ability.to_projectile(*id, position.0, target_player), - replicate: Replicate::default(), - }); + commands.spawn(ProjectileBundle::new(ability.to_projectile( + *id, + position.0, + target_player, + ))); } } } @@ -296,10 +298,9 @@ fn imperative_attack_attack( }; if cooldown.a_cooldown.is_zero() { cooldown.a_cooldown = Duration::from_secs_f32(1.5); - commands.spawn(ProjectileBundle { - projectile: ability.to_projectile(*id, position.0, direction), - replicate: Replicate::default(), - }); + commands.spawn(ProjectileBundle::new( + ability.to_projectile(*id, position.0, direction), + )); } } _ => {} |