Mobs will no longer be despawned if they aren't inside a cryopod (#16808)

* fix a crash issue

* fix another crash
This commit is contained in:
Kashargul
2025-01-01 17:40:02 +10:00
committed by GitHub
parent ca3d2a40a8
commit 3942ee8b8d
2 changed files with 8 additions and 7 deletions
+8 -5
View File
@@ -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)
@@ -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)