Files
Bubberstation/code/modules/mob/dead/observer/logout.dm
SkyratBot e149c9653d [MIRROR] Kills all unneeded uses of spawn() [MDB IGNORE] (#10594)
* Kills all unneeded uses of spawn() (#63876)

Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

* Kills all unneeded uses of spawn()

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
2022-01-11 17:15:27 +00:00

16 lines
564 B
Plaintext

/mob/dead/observer/Logout()
update_z(null)
if (client)
client.images -= (GLOB.ghost_images_default+GLOB.ghost_images_simple)
if(observetarget && ismob(observetarget))
cleanup_observe()
..()
// This is one of very few spawn()s left in our codebase
// Yes it needs to be like this
// No, you're not allowed to use spawn() yourself, unless you're making something that needs to work outside timers
// Don't be a dumbass, I will always be watching
spawn(0)
if(src && !key) //we've transferred to another mob. This ghost should be deleted.
qdel(src)