diff --git a/code/modules/atmospherics/machinery/atmospherics.dm b/code/modules/atmospherics/machinery/atmospherics.dm index 273bc27b2ce5..3278a3aa21b1 100644 --- a/code/modules/atmospherics/machinery/atmospherics.dm +++ b/code/modules/atmospherics/machinery/atmospherics.dm @@ -297,7 +297,7 @@ Pipelines + Other Objects -> Pipe network user.forceMove(target_move.loc) //handles entering and so on user.visible_message("You hear something squeezing through the ducts.", "You climb out of the ventilation system.") else if(target_move.can_crawl_through()) - if(returnPipenet() != target_move.returnPipenet()) + if(returnPipenet(target_move) != target_move.returnPipenet()) user.update_pipe_vision(target_move) user.forceMove(target_move) if(world.time - user.last_played_vent > VENT_SOUND_DELAY) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index d17135066ed5..ba283df609a4 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -517,10 +517,10 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven to_chat(src, "This ventilation duct is not connected to anything!") -/mob/living/proc/add_ventcrawl(obj/machinery/atmospherics/starting_machine) - if(!istype(starting_machine) || !starting_machine.returnPipenet() || !starting_machine.can_see_pipes()) +/mob/living/proc/add_ventcrawl(obj/machinery/atmospherics/starting_machine, obj/machinery/atmospherics/target_move) + if(!istype(starting_machine) || !starting_machine.returnPipenet(target_move) || !starting_machine.can_see_pipes()) return - var/datum/pipeline/pipeline = starting_machine.returnPipenet() + var/datum/pipeline/pipeline = starting_machine.returnPipenet(target_move) var/list/totalMembers = list() totalMembers |= pipeline.members totalMembers |= pipeline.other_atmosmch @@ -542,13 +542,15 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven /atom/proc/update_pipe_vision() return -/mob/living/update_pipe_vision() - if(pipes_shown.len) +/mob/living/update_pipe_vision(obj/machinery/atmospherics/target_move) + if(pipes_shown.len && !(target_move)) if(!is_ventcrawling(src)) remove_ventcrawl() else if(is_ventcrawling(src)) - add_ventcrawl(loc) + if(target_move) + remove_ventcrawl() + add_ventcrawl(loc, target_move) //Throwing stuff