diff --git a/code/modules/wiremod/components/atom/health.dm b/code/modules/wiremod/components/atom/health.dm index ee04030259e..49798930d97 100644 --- a/code/modules/wiremod/components/atom/health.dm +++ b/code/modules/wiremod/components/atom/health.dm @@ -43,7 +43,8 @@ var/mob/living/organism = input_port.value var/turf/current_turf = get_location() - if(!istype(organism) || get_dist(current_turf, organism) > max_range || current_turf.z != organism.z) + var/turf/target_location = get_turf(organism) + if(!istype(organism) || get_dist(current_turf, target_location) > max_range || current_turf.z != target_location.z) brute.set_output(null) burn.set_output(null) toxin.set_output(null) diff --git a/code/modules/wiremod/components/atom/health_state.dm b/code/modules/wiremod/components/atom/health_state.dm index dc83a41fdfd..65031115941 100644 --- a/code/modules/wiremod/components/atom/health_state.dm +++ b/code/modules/wiremod/components/atom/health_state.dm @@ -36,7 +36,8 @@ /obj/item/circuit_component/compare/health_state/do_comparisons() var/mob/living/organism = input_port.value var/turf/current_turf = get_location() - if(!istype(organism) || current_turf.z != organism.z || get_dist(current_turf, organism) > max_range) + var/turf/target_location = get_turf(organism) + if(!istype(organism) || current_turf.z != target_location.z || get_dist(current_turf, target_location) > max_range) return FALSE var/current_option = state_option.value