From 7ce14ae9152500e8a979a0683b6b332014896917 Mon Sep 17 00:00:00 2001 From: Flappybat <70909958+flappybatpal@users.noreply.github.com> Date: Fri, 21 Apr 2023 16:17:07 +0100 Subject: [PATCH] Fix 8688 - AIs getting disconnected when accessing the same shell/cyborg (#13613) --- code/datums/mind.dm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 48205c7f5ccf5..ff9153ab359d3 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -82,11 +82,21 @@ datum/mind message_admins("Tried to transfer mind of mob [current] (\ref[current], [key_name(current)]) to qdel'd mob [new_character] (\ref[new_character]) God damnit. Un-qdeling the mob and praying (this will probably fuck up).") new_character.disposed = 0 else - message_admins("Tried to transfer mind [src] (\ref[src]) to qdel'd mob [new_character] (\ref[new_character]) FIX THIS SHIT") + message_admins("Tried to transfer mind [src] to qdel'd mob [new_character] (\ref[new_character]).") - Z_LOG_ERROR("Mind/TransferTo", "Trying to transfer to a mob that's in the delete queue! Jesus fucking christ.") + Z_LOG_ERROR("Mind/TransferTo", "Tried to transfer mind [(current ? "of mob " + key_name(current) : src)] to qdel'd mob [new_character].") + return //CRASH("Trying to transfer to a mob that's in the delete queue!") + if (new_character.client) + if (current) + boutput(current, "You were about to be transferred into another body, but that body was occupied!") + message_admins("Tried to transfer mind of mob [current] (\ref[current], [key_name(current)]) to mob with an existing client [new_character] (\ref[new_character])") + else + message_admins("Tried to transfer mind [src] to mob with an existing client [new_character] (\ref[new_character]).") + Z_LOG_ERROR("Mind/TransferTo", "Tried to transfer mind [(current ? "of mob " + key_name(current) : src)] to mob with an existing client [new_character] [key_name(new_character)])") + return + if (current) if(current.client) current.removeOverlaysClient(current.client)