Makes playable mobs GC better by reworking how GLOB.respawnable_list works (#17217)

This commit is contained in:
Farie82
2021-12-13 09:22:08 +01:00
committed by GitHub
parent 1df1f05323
commit 60647dc4c0
10 changed files with 21 additions and 17 deletions
+1 -1
View File
@@ -6,4 +6,4 @@
if(GLOB.non_respawnable_keys[ckey])
can_reenter_corpse = 0
GLOB.respawnable_list -= src
remove_from_respawnable_list()
+2 -2
View File
@@ -164,9 +164,9 @@ Works together with spawning an observer, noted above.
flags &= ~GHOST_CAN_REENTER
var/mob/dead/observer/ghost = new(src, flags) //Transfer safety to observer spawning proc.
ghost.timeofdeath = src.timeofdeath //BS12 EDIT
GLOB.respawnable_list -= src
remove_from_respawnable_list()
if(ghost.can_reenter_corpse)
GLOB.respawnable_list += ghost
ghost.add_to_respawnable_list()
else
GLOB.non_respawnable_keys[ckey] = 1
ghost.key = key