Skip to content

Commit

Permalink
Fixes Disconnected Observers runtiming HUD (#4667)
Browse files Browse the repository at this point in the history
# About the pull request

<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

A simple runtime job... Login() to an observed mob with a disconnected
observer will crash the inventory HUD proc because it has no client.

# Explain why it's good for the game
Less runtimes

# Testing Photographs and Procedure
Tested with dual client and breakpoints


# Changelog

Internal change only
  • Loading branch information
fira authored Oct 14, 2023
1 parent cf037cc commit 8100348
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions code/_onclick/hud/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@
return
var/mob/living/carbon/human/H = mymob
var/mob/screenmob = viewer || H

if(!screenmob?.client)
return

if(!gear.len)
inventory_shown = FALSE
return //species without inv slots don't show items.
Expand Down Expand Up @@ -181,6 +185,9 @@
var/mob/living/carbon/human/H = mymob
var/mob/screenmob = viewer || H

if(!screenmob?.client)
return

if(H.hud_used)
if(H.hud_used.hud_shown)
if(H.s_store)
Expand Down

0 comments on commit 8100348

Please sign in to comment.