From 3942ee8b8d847198aa88c08233ccd25e89c8fea5 Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Wed, 1 Jan 2025 08:40:02 +0100 Subject: [PATCH] Mobs will no longer be despawned if they aren't inside a cryopod (#16808) * fix a crash issue * fix another crash --- code/game/machinery/cryopod.dm | 13 ++++++++----- code/modules/mob/living/carbon/human/human.dm | 2 -- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 1619659f04a..6d24d496eaf 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -339,6 +339,9 @@ //Lifted from Unity stasis.dm and refactored. ~Zuhayr /obj/machinery/cryopod/process() if(occupant) + if(occupant.loc != src) + go_out(TRUE) + return //Allow a ten minute gap between entering the pod and actually despawning. if(world.time - time_entered < time_till_despawn) return @@ -654,12 +657,12 @@ for(var/obj/machinery/gateway/G in range(1,src)) G.icon_state = "on" -/obj/machinery/cryopod/robot/door/gateway/go_out() - ..() +/obj/machinery/cryopod/robot/door/gateway/go_out(var/skip_move = FALSE) + ..(skip_move) for(var/obj/machinery/gateway/G in range(1,src)) G.icon_state = "off" -/obj/machinery/cryopod/proc/go_out() +/obj/machinery/cryopod/proc/go_out(var/skip_move = FALSE) if(!occupant) return @@ -667,8 +670,8 @@ if(occupant.client) occupant.client.eye = occupant.client.mob occupant.client.perspective = MOB_PERSPECTIVE - - occupant.forceMove(get_turf(src)) + if(!skip_move) + occupant.forceMove(get_turf(src)) if(ishuman(occupant) && applies_stasis) var/mob/living/carbon/human/H = occupant H.Stasis(0) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index cfc772616de..f90accb88f8 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1814,8 +1814,6 @@ rig.visor.deactivate() to_chat(src, span_warning("\The [rig]'s visor has shuddenly deactivated!")) - ..() - /mob/living/carbon/human/get_mob_riding_slots() return list(back, head, wear_suit)