Fixes z-shadow bug

This commit is contained in:
Heroman
2019-04-07 07:29:49 +10:00
parent eee108393b
commit 6ad9a34183
2 changed files with 3 additions and 0 deletions

View File

@@ -24,6 +24,7 @@
sync_icon(L) sync_icon(L)
/mob/zshadow/Destroy() /mob/zshadow/Destroy()
owner.shadow = null
owner = null owner = null
..() //But we don't return because the hint is wrong ..() //But we don't return because the hint is wrong
return QDEL_HINT_QUEUE return QDEL_HINT_QUEUE

View File

@@ -97,6 +97,8 @@
if(istype(AM, /mob/living)) if(istype(AM, /mob/living))
var/mob/living/M = AM var/mob/living/M = AM
M.gib() M.gib()
else if(istype(AM, /mob/zshadow))
AM.Destroy() //prevent deleting shadow without deleting shadow's shadows
else if(AM.simulated && !(istype(AM, /mob/observer))) else if(AM.simulated && !(istype(AM, /mob/observer)))
qdel(AM) qdel(AM)