From 9b9410e5cbff648706254ebe7496a2a6f855b6ae Mon Sep 17 00:00:00 2001 From: Anewbe Date: Mon, 1 Oct 2018 20:24:54 -0500 Subject: [PATCH] Merge pull request #5618 from Verkister/patch-15 Fixes grabs breaking defined mob pixel offsets. --- code/modules/mob/mob_grab.dm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index b5cc72fd199..897f7c58c94 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -75,7 +75,7 @@ if(affecting.buckled) return null if(state >= GRAB_AGGRESSIVE) - animate(affecting, pixel_x = 0, pixel_y = 0, 4, 1) + animate(affecting, pixel_x = initial(affecting.pixel_x), pixel_y = initial(affecting.pixel_y), 4, 1) return affecting return null @@ -184,10 +184,10 @@ qdel(src) return if(affecting.buckled) - animate(affecting, pixel_x = 0, pixel_y = 0, 4, 1, LINEAR_EASING) + animate(affecting, pixel_x = initial(affecting.pixel_x), pixel_y = initial(affecting.pixel_y), 4, 1, LINEAR_EASING) return if(affecting.lying && state != GRAB_KILL) - animate(affecting, pixel_x = 0, pixel_y = 0, 5, 1, LINEAR_EASING) + animate(affecting, pixel_x = initial(affecting.pixel_x), pixel_y = initial(affecting.pixel_y), 5, 1, LINEAR_EASING) if(force_down) affecting.set_dir(SOUTH) //face up return @@ -215,14 +215,14 @@ switch(adir) if(NORTH) - animate(affecting, pixel_x = 0, pixel_y =-shift, 5, 1, LINEAR_EASING) + animate(affecting, pixel_x = initial(affecting.pixel_x), pixel_y =-shift, 5, 1, LINEAR_EASING) affecting.layer = BELOW_MOB_LAYER if(SOUTH) - animate(affecting, pixel_x = 0, pixel_y = shift, 5, 1, LINEAR_EASING) + animate(affecting, pixel_x = initial(affecting.pixel_x), pixel_y = shift, 5, 1, LINEAR_EASING) if(WEST) - animate(affecting, pixel_x = shift, pixel_y = 0, 5, 1, LINEAR_EASING) + animate(affecting, pixel_x = shift, pixel_y = initial(affecting.pixel_y), 5, 1, LINEAR_EASING) if(EAST) - animate(affecting, pixel_x =-shift, pixel_y = 0, 5, 1, LINEAR_EASING) + animate(affecting, pixel_x =-shift, pixel_y = initial(affecting.pixel_y), 5, 1, LINEAR_EASING) /obj/item/weapon/grab/proc/s_click(obj/screen/S) if(QDELETED(src)) @@ -394,7 +394,7 @@ return mob_size_difference(A.mob_size, B.mob_size) /obj/item/weapon/grab/Destroy() - animate(affecting, pixel_x = 0, pixel_y = 0, 4, 1, LINEAR_EASING) + animate(affecting, pixel_x = initial(affecting.pixel_x), pixel_y = initial(affecting.pixel_y), 4, 1, LINEAR_EASING) affecting.reset_plane_and_layer() if(affecting) affecting.grabbed_by -= src