diff --git a/code/game/machinery/computer/dropship_weapons.dm b/code/game/machinery/computer/dropship_weapons.dm index 60bf17388db8..6218bf0cdedb 100644 --- a/code/game/machinery/computer/dropship_weapons.dm +++ b/code/game/machinery/computer/dropship_weapons.dm @@ -594,14 +594,21 @@ return var/targ_id = text2num(href_list["cas_camera"]) + + var/datum/cas_signal/new_signal for(var/datum/cas_signal/LT as anything in cas_group.cas_signals) if(LT.target_id == targ_id && LT.valid_signal()) - selected_cas_signal = LT + new_signal = LT break - if(!selected_cas_signal) + if(!new_signal) to_chat(usr, SPAN_WARNING("Target lost or obstructed.")) return + + if(usr in selected_cas_signal?.linked_cam?.viewing_users) // Reset previous cam + remove_from_view(usr) + + selected_cas_signal = new_signal if(selected_cas_signal && selected_cas_signal.linked_cam) selected_cas_signal.linked_cam.view_directly(usr) else