From 6daedc2f0a0677b8e17877100b71ed0c1bce8f58 Mon Sep 17 00:00:00 2001 From: EgorDinamit Date: Fri, 13 Oct 2023 12:41:36 +0300 Subject: [PATCH] Fixes --- code/game/objects/effects/temporary.dm | 2 +- code/modules/spells/aimed/water_slash.dm | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/code/game/objects/effects/temporary.dm b/code/game/objects/effects/temporary.dm index c0747dcab9a..ee3e18cd529 100644 --- a/code/game/objects/effects/temporary.dm +++ b/code/game/objects/effects/temporary.dm @@ -179,7 +179,7 @@ /obj/effect/temp_visual/slash/Initialize() . = ..() animate(src, alpha = 255, time = (duration * 0.25)) - animate(src, alpha = 0, time = (duration * 0.75)) + animate(alpha = 0, time = (duration * 0.75)) // Used by water slash spell /obj/effect/temp_visual/slash/water diff --git a/code/modules/spells/aimed/water_slash.dm b/code/modules/spells/aimed/water_slash.dm index c87ecd9f519..e72e41f62bb 100644 --- a/code/modules/spells/aimed/water_slash.dm +++ b/code/modules/spells/aimed/water_slash.dm @@ -30,11 +30,18 @@ . = ..() var/turf/start_turf = get_step(get_turf(user), get_dir(user, target)) var/turf/target_turf = get_ranged_target_turf_direct(start_turf, target, slash_distance) - var/list/attack_line = getline(start_turf, target_turf) + var/list/attack_line = list() + for(var/turf/T in getline(start_turf, target_turf)) + if(T.density) + break + attack_line += T + target_turf = T var/obj/effect/temp_visual/slash/water/S = new(start_turf) - S.transform.Turn(Get_Angle(start_turf, target_turf)) - animate(S, pixel_x = (target_turf.x - start_turf.x) * world.icon_size, pixel_y = (target_turf.y - start_turf.y) * world.icon_size, transform = matrix()*3, time = 5) + var/matrix/M = matrix(S.transform) + M.Turn(Get_Angle(start_turf, target_turf)) + S.transform = M + animate(S, pixel_x = (target_turf.x - start_turf.x) * world.icon_size, pixel_y = (target_turf.y - start_turf.y) * world.icon_size, transform = M*3, time = 5) var/list/already_hit = list() for(var/turf/T in attack_line) for(var/turf/TT in view(1, T))