aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/ability.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/ability.rs')
-rw-r--r--src/shared/ability.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/shared/ability.rs b/src/shared/ability.rs
index 80c74b2..2cd44c4 100644
--- a/src/shared/ability.rs
+++ b/src/shared/ability.rs
@@ -1,4 +1,5 @@
use crate::server::entity_map::*;
+use crate::shared::area_of_effect::*;
use crate::shared::buffs::*;
use crate::shared::player::*;
use crate::shared::projectile::*;
@@ -220,7 +221,8 @@ fn dash_activation(dash: Dash) -> DirectionalAbilityActivation {
mut set: ParamSet<(
Query<&mut PlayerPosition>,
Query<(&PlayerId, &PlayerPosition)>,
- )>| {
+ )>,
+ mut commands: Commands| {
let Some(source_entity) = ({
let mut source_entity = None;
for (entity, player_id) in players.iter() {
@@ -261,6 +263,14 @@ fn dash_activation(dash: Dash) -> DirectionalAbilityActivation {
if let Ok(mut position) = positions.get_mut(source_entity) {
position.0 = dash_end;
}
+
+ commands.spawn(AreaOfEffectBundle::new(AreaOfEffect {
+ position: dash_end,
+ radius: 1.5 * PLAYER_RADIUS,
+ duration: None,
+ source_player,
+ area_of_effect_type: AreaOfEffectType::Slow,
+ }));
},
)
});