diff options
Diffstat (limited to 'src/server.rs')
-rw-r--r-- | src/server.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/server.rs b/src/server.rs index 4169178..84f9235 100644 --- a/src/server.rs +++ b/src/server.rs @@ -319,12 +319,12 @@ fn imperative_attack_attack( entity_map: Res<EntityMap>, mut commands: Commands, mut cooldowns: Query<&mut Cooldown>, - mut players: Query<(&PlayerId, &mut Imperative, &EffectiveStats)>, + mut players: Query<(&PlayerId, &mut Imperative, &EffectiveStats, &PlayerColor)>, mut positions: Query<&mut PlayerPosition>, shapes: Query<&Shape>, champions: Query<&Champion>, ) { - for (id, mut imperative, effective_stats) in players.iter_mut() { + for (id, mut imperative, effective_stats, player_color) in players.iter_mut() { let Some(entity) = entity_map.0.get(&id.0) else { *imperative = Imperative::Idle; continue; @@ -366,11 +366,10 @@ fn imperative_attack_attack( } else { base_cooldown.0[ability_slot] }; - commands.spawn(ProjectileBundle::new(ability.to_projectile( - *id, - position.0, - target_player, - ))); + commands.spawn(ProjectileBundle::new( + ability.to_projectile(*id, position.0, target_player), + ProjectileColor(player_color.0), + )); *imperative = Imperative::AttackTarget(AbilitySlot::A, target_player); } } |