diff --git a/code/modules/mob/living/ventcrawling.dm b/code/modules/mob/living/ventcrawling.dm index 251739c935..930656228d 100644 --- a/code/modules/mob/living/ventcrawling.dm +++ b/code/modules/mob/living/ventcrawling.dm @@ -91,14 +91,15 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, typecacheof(list( if(!totalMembers.len) return - for(var/X in totalMembers) - var/obj/machinery/atmospherics/A = X //all elements in totalMembers are necessarily of this type. - if(!A.pipe_vision_img) - A.pipe_vision_img = image(A, A.loc, layer = ABOVE_HUD_LAYER, dir = A.dir) - A.pipe_vision_img.plane = ABOVE_HUD_PLANE - pipes_shown += A.pipe_vision_img - if(client) - client.images += A.pipe_vision_img + if(client) + for(var/X in totalMembers) + var/obj/machinery/atmospherics/A = X //all elements in totalMembers are necessarily of this type. + if(in_view_range(client.mob, A)) + if(!A.pipe_vision_img) + A.pipe_vision_img = image(A, A.loc, layer = ABOVE_HUD_LAYER, dir = A.dir) + A.pipe_vision_img.plane = ABOVE_HUD_PLANE + client.images += A.pipe_vision_img + pipes_shown += A.pipe_vision_img movement_type |= VENTCRAWLING