diff --git a/code/datums/holocall.dm b/code/datums/holocall.dm index f88dfdf1bf9..0bb793b0944 100644 --- a/code/datums/holocall.dm +++ b/code/datums/holocall.dm @@ -69,6 +69,8 @@ else if(H == calling_holopad && connected_holopad) connected_holopad.atom_say("[usr] disconnected.") + user.unset_machine(H) + ConnectionFailure(H, TRUE) //Forcefully disconnects a holopad `H` from a call. Pads not in the call are ignored. @@ -115,6 +117,7 @@ hologram = H.activate_holo(user) hologram.HC = src + user.unset_machine(H) //eyeobj code is horrid, this is the best copypasta I could make eye = new() eye.origin = H diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 1a845f3496a..4d04f7851a3 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -244,19 +244,16 @@ var/list/holopads = list() if(HOLOPAD_MODE == RANGE_BASED) if(get_dist(AI.eyeobj, src) <= holo_range) continue - else if(HOLOPAD_MODE == AREA_BASED) - var/area/holo_area = get_area(src) - var/area/eye_area = get_area(AI.eyeobj) - if(eye_area != holo_area) - return 1 + if(!(AI.current))//if the ai jumped to core + clear_holo(AI) + return 1 var/obj/machinery/hologram/holopad/pad_close = get_closest_atom(/obj/machinery/hologram/holopad, holopads, AI.eyeobj) if(get_dist(pad_close, AI.eyeobj) <= pad_close.holo_range) clear_holo(AI) pad_close.activate_holo(AI, 1) else - continue clear_holo(master)//If is a non AI holo clear it. @@ -280,6 +277,13 @@ var/list/holopads = list() var/obj/effect/overlay/holo_pad_hologram/H = masters[user] step_to(H, new_turf) H.loc = new_turf + if(ishuman(user)) + var/area/holo_area = get_area(src) + var/area/eye_area = get_area(new_turf.loc) + + if(eye_area != holo_area) + clear_holo(user) + return 1 /obj/machinery/hologram/holopad/proc/activate_holo(mob/living/user, var/force = 0) @@ -302,7 +306,6 @@ var/list/holopads = list() hologram.alpha = 100 hologram.Impersonation = user - //hologram.languages = user.languages hologram.mouse_opacity = 0//So you can't click on it. hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them. hologram.anchored = 1//So space wind cannot drag it. @@ -353,6 +356,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/ var/mob/living/silicon/ai/AI = user if(istype(AI)) AI.current = src + h.forceMove(get_turf(AI.eyeobj)) SetLightsAndPower() return TRUE diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index be265669b79..c48d03bd8ef 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -916,7 +916,8 @@ /mob/living/carbon/human/handle_vision() if(machine) - if(!machine.check_eye(src)) reset_perspective(null) + if(!machine.check_eye(src)) + reset_perspective(null) else var/isRemoteObserve = 0 if((REMOTE_VIEW in mutations) && remoteview_target)