makes it plausible to hear most sounds while inside of a VR sleeper (#8034)
This commit is contained in:
@@ -1067,10 +1067,12 @@
|
||||
update_canmove() //if the mob was asleep inside a container and then got forceMoved out we need to make them fall.
|
||||
|
||||
/mob/living/proc/update_z(new_z) // 1+ to register, null to unregister
|
||||
if(isnull(new_z) && audiovisual_redirect)
|
||||
return
|
||||
if (registered_z != new_z)
|
||||
if (registered_z)
|
||||
SSmobs.clients_by_zlevel[registered_z] -= src
|
||||
if (client)
|
||||
if (client || audiovisual_redirect)
|
||||
if (new_z)
|
||||
SSmobs.clients_by_zlevel[new_z] += src
|
||||
for (var/I in length(SSidlenpcpool.idle_mobs_by_zlevel[new_z]) to 1 step -1) //Backwards loop because we're removing (guarantees optimal rather than worst-case performance), it's fine to use .len here but doesn't compile on 511
|
||||
|
||||
@@ -76,6 +76,8 @@
|
||||
return "a ... thing?"
|
||||
|
||||
/mob/proc/show_message(msg, type, alt_msg, alt_type)//Message, type of message (1 or 2), alternative message, alt message type (1 or 2)
|
||||
if(audiovisual_redirect)
|
||||
audiovisual_redirect.show_message(msg ? "<avredirspan class='small'>[msg]</avredirspan>" : null, type, alt_msg ? "<avredirspan class='small'>[alt_msg]</avredirspan>" : null, alt_type)
|
||||
|
||||
if(!client)
|
||||
return
|
||||
|
||||
@@ -110,3 +110,5 @@
|
||||
var/datum/click_intercept
|
||||
|
||||
var/registered_z
|
||||
|
||||
var/mob/audiovisual_redirect //Mob to redirect messages, speech, and sounds to
|
||||
|
||||
Reference in New Issue
Block a user