From 811b80156915aa0fac75a07bf2fd8ecefcf6bcc9 Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Thu, 28 May 2020 05:11:42 -0700 Subject: [PATCH] fixes ghost role eligibility delay (#12379) --- code/modules/mob/dead/observer/observer.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 838de24b60..5364486b04 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -287,12 +287,12 @@ Works together with spawning an observer, noted above. var/maximumRoundEnd = SSautotransfer.starttime + SSautotransfer.voteinterval * SSautotransfer.maxvotes if(penalty - SSshuttle.realtimeofstart > maximumRoundEnd + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime) penalty = CANT_REENTER_ROUND - if(!(ckey in GLOB.client_ghost_timeouts)) - GLOB.client_ghost_timeouts += ckey - GLOB.client_ghost_timeouts[ckey] = 0 - else if(GLOB.client_ghost_timeouts[ckey] == CANT_REENTER_ROUND) + if(!(ghost.ckey in GLOB.client_ghost_timeouts)) + GLOB.client_ghost_timeouts += ghost.ckey + GLOB.client_ghost_timeouts[ghost.ckey] = 0 + else if(GLOB.client_ghost_timeouts[ghost.ckey] == CANT_REENTER_ROUND) return - GLOB.client_ghost_timeouts[ckey] = max(GLOB.client_ghost_timeouts[ckey],penalty) + GLOB.client_ghost_timeouts[ghost.ckey] = max(GLOB.client_ghost_timeouts[ghost.ckey],penalty) // needs to be done AFTER the ckey transfer, too return ghost