From 140d36891843ec562bfd81fd8206d9a65a6fa6dd Mon Sep 17 00:00:00 2001 From: JJRcop Date: Tue, 18 Nov 2014 12:31:19 -0500 Subject: [PATCH] Fixes unreported issue with get_ghost Get_ghost was not returning the ghost if players were disconnected from the server while ghosted --- code/game/dna.dm | 12 ++++-------- .../mob/living/simple_animal/friendly/drone.dm | 2 +- code/modules/mob/mob.dm | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/code/game/dna.dm b/code/game/dna.dm index 4c1dddbb456..b158ffd5a05 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -451,14 +451,10 @@ || locate(/obj/machinery/computer/cloning, get_step(src, EAST)) \ || locate(/obj/machinery/computer/cloning, get_step(src, WEST))) - if(!occupant.key && occupant.mind) - for(var/mob/dead/observer/ghost in player_list) - if(ghost.mind == occupant.mind) - if(ghost.can_reenter_corpse) - ghost << "Your corpse has been placed into a cloning scanner. Return to your body if you want to be cloned! (Verbs -> Ghost -> Re-enter corpse)" - ghost << sound('sound/effects/genetics.ogg') - break - + var/mob/dead/observer/ghost = occupant.get_ghost() + if(ghost) + ghost << "Your corpse has been placed into a cloning scanner. Return to your body if you want to be cloned! (Verbs -> Ghost -> Re-enter corpse)" + ghost << sound('sound/effects/genetics.ogg') return 1 /obj/machinery/dna_scannernew/proc/open(mob/user) diff --git a/code/modules/mob/living/simple_animal/friendly/drone.dm b/code/modules/mob/living/simple_animal/friendly/drone.dm index 0928dbf2765..4b92a602b00 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone.dm @@ -78,7 +78,7 @@ switch(d_input) if("Reactivate") var/mob/dead/observer/G = get_ghost() - if(!client && !G) + if(!client && (!G || !G.client)) var/list/faux_gadgets = list("hypertext inflator","failsafe directory","DRM switch","stack initializer",\ "anti-freeze capacitor","data stream diode","TCP bottleneck","supercharged I/O bolt",\ "tradewind stablizer","radiated XML cable","registry fluid tank","open-source debunker") diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 0ea87f92744..5deeaa9b8f9 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -878,7 +878,7 @@ var/list/slot_equipment_priority = list( \ /mob/proc/get_ghost(even_if_they_cant_reenter = 0) if(mind) - for(var/mob/dead/observer/G in player_list) + for(var/mob/dead/observer/G in dead_mob_list) if(G.mind == mind) if(G.can_reenter_corpse || even_if_they_cant_reenter) return G