diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 19b8ce2ebd4..93b31526596 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -91,6 +91,9 @@ leave_all_huds() //leave all the huds in the old body, so it won't get huds if somebody else enters it current = new_character //associate ourself with our new body new_character.mind = src //and associate our new body with ourself + if(iscarbon(new_character)) + var/mob/living/carbon/C = new_character + C.last_mind = src transfer_antag_huds(hud_to_transfer) //inherit the antag HUD transfer_actions(new_character) @@ -1533,6 +1536,10 @@ mind.name = real_name mind.current = src +/mob/living/carbon/mind_initialize() + ..() + last_mind = mind + //HUMAN /mob/living/carbon/human/mind_initialize() ..() diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm index b0547c9f0d6..73ae98b59db 100644 --- a/code/modules/mob/living/blood.dm +++ b/code/modules/mob/living/blood.dm @@ -162,8 +162,13 @@ blood_data["trace_chem"] = list2params(temp_chem) if(mind) blood_data["mind"] = mind + else if(last_mind) + blood_data["mind"] = last_mind if(ckey) blood_data["ckey"] = ckey + else if(last_mind) + blood_data["ckey"] = ckey(last_mind.key) + if(!suiciding) blood_data["cloneable"] = 1 blood_data["blood_type"] = copytext(dna.blood_type,1,0) diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index e163cb6dc35..1c1a00fd45c 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -25,6 +25,7 @@ var/obj/item/ears = null //only used by humans. var/datum/dna/dna = null//Carbon + var/datum/mind/last_mind = null //last mind to control this mob, for blood-based cloning var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks.