Merge pull request #10549 from VOREStation/Arokha/ghostinst

Ghost instrument fix
This commit is contained in:
Aronai Sieyes
2021-06-02 21:58:40 -04:00
committed by Chompstation Bot
parent 4e39cb8cfc
commit a6096d9f7a
2 changed files with 3 additions and 2 deletions

View File

@@ -161,7 +161,7 @@
var/list/old = hearing_mobs.Copy() var/list/old = hearing_mobs.Copy()
hearing_mobs.len = 0 hearing_mobs.len = 0
var/turf/source = get_turf(parent) var/turf/source = get_turf(parent)
var/list/in_range = get_mobs_and_objs_in_view_fast(source, instrument_range) var/list/in_range = get_mobs_and_objs_in_view_fast(source, instrument_range, remote_ghosts = FALSE)
for(var/mob/M in in_range["mobs"]) for(var/mob/M in in_range["mobs"])
hearing_mobs[M] = get_dist(M, source) hearing_mobs[M] = get_dist(M, source)
var/list/exited = old - hearing_mobs var/list/exited = old - hearing_mobs

View File

@@ -60,6 +60,7 @@
var/channel_text = num2text(channel) var/channel_text = num2text(channel)
channels_playing[channel_text] = 100 channels_playing[channel_text] = 100
last_channel_played = channel_text last_channel_played = channel_text
var/turf/source = get_turf(parent)
for(var/i in hearing_mobs) for(var/i in hearing_mobs)
var/mob/M = i var/mob/M = i
/* Maybe someday /* Maybe someday
@@ -69,7 +70,7 @@
*/ */
// Jeez // Jeez
M.playsound_local( M.playsound_local(
turf_source = get_turf(parent), turf_source = source,
soundin = null, soundin = null,
vol = volume, vol = volume,
vary = FALSE, vary = FALSE,