ghostize() now attempts to set the most relevant time of death.

ghostize() now only uses the mob's time of death if the mob is actually dead, otherwise uses the current time. Fixes #11229.
This commit is contained in:
PsiOmegaDelta
2015-10-12 12:55:34 +02:00
parent de68e366f5
commit 7247906f41

View File

@@ -149,7 +149,7 @@ Works together with spawning an observer, noted above.
if(key)
var/mob/dead/observer/ghost = new(src) //Transfer safety to observer spawning proc.
ghost.can_reenter_corpse = can_reenter_corpse
ghost.timeofdeath = src.timeofdeath //BS12 EDIT
ghost.timeofdeath = src.stat == DEAD ? src.timeofdeath : world.time
ghost.key = key
if(ghost.client && !ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
ghost.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing!