Compromise on speach_sound, will check distance instead of just checking if ghost.

This commit is contained in:
Ccomp5950
2014-07-23 01:48:48 -05:00
parent 569e8361dc
commit 98abc5bfc4

View File

@@ -55,7 +55,7 @@
src << "<span class='name'>[speaker_name]</span>[alt_name] talks but you cannot hear \him."
else
src << "<span class='game say'><span class='name'>[speaker_name]</span>[alt_name] [track][verb], <span class='message'><span class='[style]'>\"[message]\"</span></span></span>"
if (speech_sound && !istype(src, /mob/dead/observer))
if (speech_sound && (get_dist(speaker, src) <= world.view && src.z == speaker.z))
var/turf/source = speaker? get_turf(speaker) : get_turf(src)
src.playsound_local(source, speech_sound, sound_vol, 1)