From e1ba7754f91cb3cbddbd6c09d7010d5a98c2a5c2 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 5 Dec 2022 12:00:18 +0100 Subject: [PATCH] [MIRROR] Fixes a bug where ghosts spawning on the lower z layer would be double offset [MDB IGNORE] (#17901) * Fixes a bug where ghosts spawning on the lower z layer would be double offset (#71668) ## About The Pull Request This code assumes they haven't been offset yet, and they very much have due to an abstract_move in their pre ..() initialize. Let's just use initial here it's a cold path so it's fineee * Fixes a bug where ghosts spawning on the lower z layer would be double offset Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> --- code/modules/mob/dead/dead.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/dead/dead.dm b/code/modules/mob/dead/dead.dm index 1cbb6b5efcf..cddc12fe3d9 100644 --- a/code/modules/mob/dead/dead.dm +++ b/code/modules/mob/dead/dead.dm @@ -12,7 +12,8 @@ INITIALIZE_IMMEDIATE(/mob/dead) if(flags_1 & INITIALIZED_1) stack_trace("Warning: [src]([type]) initialized multiple times!") flags_1 |= INITIALIZED_1 - SET_PLANE_IMPLICIT(src, plane) + // Initial is non standard here, but ghosts move before they get here so it's needed. this is a cold path too so it's ok + SET_PLANE_IMPLICIT(src, initial(plane)) tag = "mob_[next_mob_id++]" add_to_mob_list()