aboutsummaryrefslogtreecommitdiffstats
path: root/src/server.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/server.rs')
-rw-r--r--src/server.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/server.rs b/src/server.rs
index 1fe20a4..d9f2653 100644
--- a/src/server.rs
+++ b/src/server.rs
@@ -269,13 +269,19 @@ fn imperative_attack_attack(
};
if cooldown.a_cooldown.is_zero() {
cooldown.a_cooldown = Duration::from_secs_f32(1.5);
+ let instant = *champion == Champion::Meele;
commands.spawn(ProjectileBundle {
projectile: Projectile {
target_player,
source_player: *id,
damage: 4.,
+ instant,
},
- position: ProjectilePosition(position.0),
+ position: ProjectilePosition(if instant {
+ target_position.0
+ } else {
+ position.0
+ }),
replicate: Replicate::default(),
});
}