From e3201b83d9cffe9f54338dfee953150d9df9a81c Mon Sep 17 00:00:00 2001 From: Verkister Date: Sat, 27 Aug 2022 17:25:42 +0300 Subject: [PATCH] Earlyports a couple ghost fixes Fixes ghost hover anim not looping and also makes them preserve the offsets from original body instead of resetting to 0 every time they move. --- code/modules/mob/dead/observer/observer.dm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 3958cee14a..1da2ae1081 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -123,7 +123,8 @@ if(ishuman(body)) var/mob/living/carbon/human/H = body add_overlay(H.overlays_standing) - + default_pixel_x = body.default_pixel_x + default_pixel_y = body.default_pixel_y if(!T) T = pick(latejoin) //Safety in case we cannot find the body's position if(T) @@ -136,6 +137,7 @@ name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names)) real_name = name animate(src, pixel_y = 2, time = 10, loop = -1) + animate(pixel_y = default_pixel_y, time = 10, loop = -1) observer_mob_list += src ..() @@ -505,10 +507,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob/observer/dead/stop_orbit() . = ..() //restart our floating animation after orbit is done. - pixel_y = 0 - pixel_x = 0 + pixel_y = default_pixel_y + pixel_x = default_pixel_x transform = null animate(src, pixel_y = 2, time = 10, loop = -1) + animate(pixel_y = default_pixel_y, time = 10, loop = -1) /mob/observer/dead/proc/stop_following() following = null