Human Hard Del Fix (#21884)

This PR fixes the Hard Del() caused by deleting any
/mob/living/carbon/human. For once I've actually sat down and tested a
hard del PR, so here's the proof that the problem is solved:

<img width="1305" height="411" alt="image"
src="https://github.com/user-attachments/assets/d11d7e14-e349-4a33-b154-0821c27154a4"
/>
This commit is contained in:
VMSolidus
2026-02-18 20:37:20 -05:00
committed by GitHub
parent 310ed9b4c0
commit bb34bb4f5e
4 changed files with 15 additions and 5 deletions
+4 -2
View File
@@ -43,8 +43,10 @@
QDEL_NULL(bloodstr)
QDEL_NULL(dna)
QDEL_NULL(breathing)
for(var/guts in internal_organs)
qdel(guts)
// Delete and null a direct list of references to our internal organs (such as brain, lungs, heart, etc).
QDEL_LIST(internal_organs)
// Null an Associative list of String = Reference to the same organs.
internal_organs_by_name = null
return ..()
/mob/living/carbon/rejuvenate()
@@ -114,9 +114,10 @@
GLOB.human_mob_list -= src
GLOB.intent_listener -= src
// This is apparently a different list entirely from the list of organs on /mob/living/carbon.
// It's actually the set of all Limbs (left arm, head, leg leg, etc) we have. We Qdel and null the set of all limbs, which is unique to /human.
QDEL_LIST(organs)
internal_organs_by_name = null
internal_organs = null
// Then also null the associative list of those same limbs, which contains the same references.
organs_by_name = null
bad_internal_organs = null
bad_external_organs = null
+4 -1
View File
@@ -4,7 +4,10 @@
/mob/Destroy()//This makes sure that mobs with clients/keys are not just deleted from the game.
MOB_STOP_THINKING(src)
// Tell any mobs touching us that they're not pulling us anymore.
stop_pulling()
// Delete and null the grab objects that are touching this mob.
QDEL_LIST(grabbed_by)
GLOB.mob_list -= src
GLOB.dead_mob_list -= src
GLOB.living_mob_list -= src
@@ -0,0 +1,4 @@
author: Hellfirejag
delete-after: True
changes:
- bugfix: "Fixed a hard delete related to human mobs."