Fixes destroyed non-human bodies cloning as humans. (#39099)

I really don't like my way of doing this but I don't know if there's something
more obvious I'm missing...
This commit is contained in:
Jared-Fogle
2018-07-20 20:03:42 -07:00
committed by yogstation13-bot
parent fd7089dd12
commit 32a1525a23
2 changed files with 5 additions and 1 deletions

View File

@@ -12,6 +12,7 @@
var/list/temporary_mutations = list() //Timers for temporary mutations
var/list/previous = list() //For temporary name/ui/ue/blood_type modifications
var/mob/living/holder
var/delete_species = TRUE //Set to FALSE when a body is scanned by a cloner to fix #38875
/datum/dna/New(mob/living/new_holder)
if(istype(new_holder))
@@ -23,7 +24,9 @@
if(cholder.dna == src)
cholder.dna = null
holder = null
QDEL_NULL(species)
if(delete_species)
QDEL_NULL(species)
mutations.Cut() //This only references mutations, just dereference.
temporary_mutations.Cut() //^

View File

@@ -468,6 +468,7 @@
// We store the instance rather than the path, because some
// species (abductors, slimepeople) store state in their
// species datums
dna.delete_species = FALSE
R.fields["mrace"] = dna.species
else
var/datum/species/rando_race = pick(GLOB.roundstart_races)