(Hopefully) Fix Mind GC Issues (#2301)

Should fix weirdness with mob GC such as ghosts jumping to their deleted bodies, observers failing to GC, and mobs with minds not GCing in general.

changes:

Mob cleanup relating to the mob has been moved to the mind.
On deletion a mob will now null out the current and original fields in the mind, if they pointed to it.
This commit is contained in:
Lohikar
2017-05-20 14:24:47 +03:00
committed by skull132
parent 58b953a3fc
commit 277790a630
2 changed files with 11 additions and 2 deletions
+2 -2
View File
@@ -11,8 +11,8 @@
for(var/atom/movable/AM in client.screen)
qdel(AM)
client.screen = list()
if(mind && mind.current == src)
spellremove(src)
if (mind)
mind.handle_mob_deletion(src)
for(var/infection in viruses)
qdel(infection)
viruses.Cut()