aboutsummaryrefslogtreecommitdiffstats
path: root/src/client.rs
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2024-03-19 03:00:42 +0100
committerLibravatar Alexander Foremny <aforemny@posteo.de>2024-03-19 04:51:10 +0100
commitee2bc9dca88e52b92a49a9ff21db8832b3b66255 (patch)
tree43c3d85107eb0ac1286c50094e6d78ee913a683f /src/client.rs
parent66b4afc529e6d1c4b8f624bbfddc0195ce8d17d5 (diff)
feat: dash ability
Diffstat (limited to 'src/client.rs')
-rw-r--r--src/client.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/client.rs b/src/client.rs
index bd2c448..22e3960 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -429,6 +429,22 @@ fn gizmos_attack_indicator(
};
match champion.to_ability(ability_slot) {
Ability::Activated(_) => {}
+ Ability::Directional(DirectionalAbility::Dash) => {
+ let Some(world_position) = cursor_world_position(&windows, &cameras) else {
+ return;
+ };
+ let Some(direction) = (world_position - position.0).try_normalize() else {
+ return;
+ };
+ let dash_end = dash_collision(
+ PlayerId(client_id.0),
+ position.0,
+ direction,
+ 150.,
+ &player_positions,
+ );
+ gizmos.arrow_2d(position.0, dash_end, Color::YELLOW);
+ }
Ability::Directional(_) => {
let Some(world_position) = cursor_world_position(&windows, &cameras) else {
return;