mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
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.
This commit is contained in:
@@ -123,7 +123,8 @@
|
|||||||
if(ishuman(body))
|
if(ishuman(body))
|
||||||
var/mob/living/carbon/human/H = body
|
var/mob/living/carbon/human/H = body
|
||||||
add_overlay(H.overlays_standing)
|
add_overlay(H.overlays_standing)
|
||||||
|
default_pixel_x = body.default_pixel_x
|
||||||
|
default_pixel_y = body.default_pixel_y
|
||||||
if(!T)
|
if(!T)
|
||||||
T = pick(latejoin) //Safety in case we cannot find the body's position
|
T = pick(latejoin) //Safety in case we cannot find the body's position
|
||||||
if(T)
|
if(T)
|
||||||
@@ -136,6 +137,7 @@
|
|||||||
name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
|
name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
|
||||||
real_name = name
|
real_name = name
|
||||||
animate(src, pixel_y = 2, time = 10, loop = -1)
|
animate(src, pixel_y = 2, time = 10, loop = -1)
|
||||||
|
animate(pixel_y = default_pixel_y, time = 10, loop = -1)
|
||||||
observer_mob_list += src
|
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()
|
/mob/observer/dead/stop_orbit()
|
||||||
. = ..()
|
. = ..()
|
||||||
//restart our floating animation after orbit is done.
|
//restart our floating animation after orbit is done.
|
||||||
pixel_y = 0
|
pixel_y = default_pixel_y
|
||||||
pixel_x = 0
|
pixel_x = default_pixel_x
|
||||||
transform = null
|
transform = null
|
||||||
animate(src, pixel_y = 2, time = 10, loop = -1)
|
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()
|
/mob/observer/dead/proc/stop_following()
|
||||||
following = null
|
following = null
|
||||||
|
|||||||
Reference in New Issue
Block a user