[MIRROR] Fixes weather listener and area sound manager runtime when brains are inserted into corpses. [MDB IGNORE] (#16794)

* Fixes weather listener and area sound manager runtime when brains are inserted into corpses. (#70343)

Essentially, the brain is set to nullspace for a second when inserted into a body, which was messing with brain mobs since z_level_change wasn't expecting the loc to be a null turf. (mobs in nullspace are bad.)

At this very same moment though, the brain obj's owner (carbon) is set, so we can just report that since that's going to be the loc sent to the signal again in half a moment anyway.

* Fixes weather listener and area sound manager runtime when brains are inserted into corpses.

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-10-12 13:52:00 -04:00
committed by GitHub
co-authored by ShizCalev
parent 877f6b9f91
commit 12db35a383
+6
View File
@@ -20,6 +20,12 @@
ADD_TRAIT(src, TRAIT_HANDS_BLOCKED, BRAIN_UNAIDED)
/mob/living/brain/on_changed_z_level(turf/old_turf, turf/new_turf, same_z_layer, notify_contents)
var/obj/item/organ/internal/brain/brain_loc = loc
if(brain_loc && isnull(new_turf) && brain_loc.owner) //we're actively being put inside a new body.
return ..(old_turf, get_turf(brain_loc.owner), same_z_layer, notify_contents)
return ..()
/mob/living/brain/proc/create_dna()
stored_dna = new /datum/dna/stored(src)
if(!stored_dna.species)