diff --git a/code/datums/holocall.dm b/code/datums/holocall.dm index a3157e6514..a2a26652cd 100644 --- a/code/datums/holocall.dm +++ b/code/datums/holocall.dm @@ -43,18 +43,18 @@ //cleans up ALL references :) /datum/holocall/Destroy() - user.reset_perspective() - if(user.client) - for(var/datum/camerachunk/chunk in eye.visibleCameraChunks) - chunk.remove(eye) - user.remote_control = null + if(!QDELETED(user)) + user.reset_perspective() + if(user.client) + for(var/datum/camerachunk/chunk in eye.visibleCameraChunks) + chunk.remove(eye) + user.remote_control = null + user = null QDEL_NULL(eye) - user = null if(hologram) hologram.HC = null - hologram = null - calling_holopad.outgoing_call = null + hologram = null for(var/I in dialed_holopads) var/obj/machinery/holopad/H = I @@ -62,6 +62,7 @@ dialed_holopads.Cut() if(calling_holopad) + calling_holopad.outgoing_call = null calling_holopad.SetLightsAndPower() calling_holopad = null if(connected_holopad) @@ -86,7 +87,7 @@ /datum/holocall/proc/ConnectionFailure(obj/machinery/holopad/H, graceful = FALSE) testing("Holocall connection failure: graceful [graceful]") if(H == connected_holopad || H == calling_holopad) - if(!graceful) + if(!graceful && H != calling_holopad) calling_holopad.say("Connection failure.") qdel(src) return @@ -152,9 +153,7 @@ . = !QDELETED(user) && !user.incapacitated() && !QDELETED(calling_holopad) && calling_holopad.is_operational() && user.loc == calling_holopad.loc if(.) - if(connected_holopad) - . = !QDELETED(connected_holopad) && connected_holopad.is_operational() - else + if(!connected_holopad) . = world.time < (call_start_time + HOLOPAD_MAX_DIAL_TIME) if(!.) calling_holopad.say("No answer recieved.") diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 7cf0b69d7d..7a8adfa0c8 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -75,6 +75,13 @@ Possible to do for anyone motivated enough: stat &= ~NOPOWER else stat |= ~NOPOWER + if(outgoing_call) + outgoing_call.ConnectionFailure(src) + +/obj/machinery/holopad/obj_break() + . = ..() + if(outgoing_call) + outgoing_call.ConnectionFailure(src) /obj/machinery/holopad/RefreshParts() var/holograph_range = 4 diff --git a/code/game/machinery/hologram.dm.rej b/code/game/machinery/hologram.dm.rej new file mode 100644 index 0000000000..b2237e799d --- /dev/null +++ b/code/game/machinery/hologram.dm.rej @@ -0,0 +1,16 @@ +diff a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm (rejected hunks) +@@ -58,13 +58,11 @@ Possible to do for anyone motivated enough: + + /obj/machinery/holopad/Destroy() + if(outgoing_call) +- LAZYADD(holo_calls, outgoing_call) +- outgoing_call = null ++ outgoing_call.ConnectionFailure(src) + + for(var/I in holo_calls) + var/datum/holocall/HC = I + HC.ConnectionFailure(src) +- LAZYCLEARLIST(holo_calls) + + for (var/I in masters) + clear_holo(I)