Skip to content

Commit

Permalink
Fix 8688 - AIs getting disconnected when accessing the same shell/cyb…
Browse files Browse the repository at this point in the history
  • Loading branch information
flappybatpal authored Apr 21, 2023
1 parent ab786f8 commit 7ce14ae
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions code/datums/mind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7ce14ae

Please sign in to comment.