From 4ed87f0f549b8782a4a00533406d166d29e95be5 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Fri, 11 Jan 2019 01:54:47 -0500 Subject: [PATCH] goonstyle attack animations - makes attacking rotate your character a little in the direction you're attacking --- code/game/atoms_movable.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index ba840d0771..e56f6d366c 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -622,8 +622,12 @@ else if(direction & WEST) pixel_x_diff = -8 - animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, time = 2) - animate(src, pixel_x = pixel_x - pixel_x_diff, pixel_y = pixel_y - pixel_y_diff, time = 2) + var/matrix/OM = matrix(transform) + var/matrix/M = matrix(transform) + M.Turn(pixel_x_diff ? pixel_x_diff*2 : pick(-16, 16)) + + animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, transform = M, time = 2) + animate(src, pixel_x = pixel_x - pixel_x_diff, pixel_y = pixel_y - pixel_y_diff, transform = OM, time = 2) /atom/movable/proc/do_item_attack_animation(atom/A, visual_effect_icon, obj/item/used_item) var/image/I