fix observer tracking (#17366)

This commit is contained in:
Kashargul
2025-03-18 15:30:30 +01:00
committed by GitHub
parent 442344a4c2
commit 574c2933fb
+9 -5
View File
@@ -70,17 +70,21 @@
for(var/mob/M as anything in m_viewers)
if(M)
var/final_message = message
if(isobserver(M))
message = span_emote(span_bold("[src]") + " ([ghost_follow_link(src, M)]) [input]")
final_message = span_emote(span_bold("[src]") + " ([ghost_follow_link(src, M)]) [input]")
if(src.client && M && !(get_z(src) == get_z(M)))
message = span_multizsay("[message]")
final_message = span_multizsay("[final_message]")
// If you are in the same tile, right next to, or being held by a person doing an emote, you should be able to see it while blind
if(m_type != AUDIBLE_MESSAGE && (src.Adjacent(M) || (istype(src.loc, /obj/item/holder) && src.loc.loc == M)))
M.show_message(message)
M.show_message(final_message)
else
M.show_message(message, m_type)
M.show_message(final_message, m_type)
M.create_chat_message(src, "[runemessage]", FALSE, list("emote"), (m_type == AUDIBLE_MESSAGE))
for(var/obj/O as anything in o_viewers)
if(O)
O.see_emote(src, message, m_type)
var/final_message = message
if(src.client && O && !(get_z(src) == get_z(O)))
final_message = span_multizsay("[final_message]")
O.see_emote(src, final_message, m_type)