From 720cf262c1924b957cd3ac9f61c40fa8a9f6e44d Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 18 Dec 2023 20:01:22 +0100 Subject: [PATCH] [MIRROR] Fixes observers spamming admin logs when observing themselves [MDB IGNORE] (#25714) * Fixes observers spamming admin logs when observing themselves (#80407) ## About The Pull Request Fixes #77034 by adding in a check to do_observe to prevent observers from observing themselves. It does prevent them from observing their own bodies and seeing their hud and entire inventory as a ghost, but that's not a major problem because they probably either remember what they had if it's so important to constantly see what's on their mob or it doesn't matter. Additionally they can just use re-enter corpse so whatever. ## Why It's Good For The Game Observers can no longer intentionally or even completely accidentally flood admin logs from their observetarget not resetting due to them observing themselves. ## Changelog :cl: fix: Observers observing themselves no longer floods admins' logs. /:cl: * Fixes observers spamming admin logs when observing themselves --------- Co-authored-by: Diamond_ --- code/modules/mob/dead/observer/observer.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index a8cb7e9eb4d..c3c87bef4ab 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -984,7 +984,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(is_secret_level(mob_eye.z) && !client?.holder) set_sight(null) //we dont want ghosts to see through walls in secret areas RegisterSignal(mob_eye, COMSIG_MOVABLE_Z_CHANGED, PROC_REF(on_observing_z_changed)) - if(mob_eye.hud_used) + if(mob_eye.hud_used && src != usr) // can't view your own inventory and hud but you're either A: permanently ghosted out. Or B: dead and it barely matters. client.clear_screen() LAZYOR(mob_eye.observers, src) mob_eye.hud_used.show_hud(mob_eye.hud_used.hud_version, src)