Skip to content

Commit

Permalink
Fix tod not getting assigned if ghostized without a client
Browse files Browse the repository at this point in the history
  • Loading branch information
Drulikar committed Jun 9, 2024
1 parent 63ce33d commit 00b547f
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions code/modules/mob/dead/observer/observer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,12 @@ Works together with spawning an observer, noted above.

mind = null

// Larva queue: We use the larger of their existing queue time or the new timeofdeath except for facehuggers or lesser drone
var/new_tod = (isfacehugger(src) || islesserdrone(src)) ? 1 : ghost.timeofdeath

// if they died as facehugger or lesser drone, bypass typical TOD checks
ghost.bypass_time_of_death_checks = (isfacehugger(src) || islesserdrone(src))

if(ghost.client)
ghost.client.init_verbs()
ghost.client.change_view(GLOB.world_view_size) //reset view range to default
Expand All @@ -485,13 +491,12 @@ Works together with spawning an observer, noted above.
if(ghost.client.player_data)
ghost.client.player_data.load_timestat_data()

// Larva queue: We use the larger of their existing queue time or the new timeofdeath except for facehuggers or lesser drone
var/new_tod = (isfacehugger(src) || islesserdrone(src)) ? 1 : ghost.timeofdeath

// if they died as facehugger or lesser drone, bypass typical TOD checks
ghost.bypass_time_of_death_checks = (isfacehugger(src) || islesserdrone(src))
ghost.client.player_details.larva_queue_time = max(ghost.client.player_details.larva_queue_time, new_tod)

ghost.client?.player_details.larva_queue_time = max(ghost.client.player_details.larva_queue_time, new_tod)
else if(persistent_ckey)
var/datum/player_details/details = GLOB.player_details[persistent_ckey]
if(details)
details.larva_queue_time = max(ghost.client.player_details.larva_queue_time, new_tod)

ghost.set_huds_from_prefs()

Expand Down

0 comments on commit 00b547f

Please sign in to comment.