diff --git a/code/controllers/subsystems/mobs.dm b/code/controllers/subsystems/mobs.dm
index 4f7d524a8f..8fb2bf3f89 100644
--- a/code/controllers/subsystems/mobs.dm
+++ b/code/controllers/subsystems/mobs.dm
@@ -42,6 +42,7 @@ SUBSYSTEM_DEF(mobs)
if(!M || QDELETED(M))
mob_list -= M
+ continue
else if(M.low_priority && !(process_z[get_z(M)]))
slept_mobs++
continue
diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm
index 43096f2753..dd816d1e8f 100644
--- a/code/modules/mob/living/carbon/human/death.dm
+++ b/code/modules/mob/living/carbon/human/death.dm
@@ -12,7 +12,7 @@
for(var/obj/item/organ/I in internal_organs)
I.removed()
- if(istype(loc,/turf))
+ if(isturf(I?.loc)) // Some organs qdel themselves or other things when removed
I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
for(var/obj/item/organ/external/E in src.organs)
diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm
index a0170217ee..6cc817a6f7 100644
--- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm
+++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm
@@ -107,75 +107,113 @@
..()
/mob/living/simple_mob/protean_blob/updatehealth()
- if(humanform)
- //Set the max
- maxHealth = humanform.getMaxHealth()*2 //HUMANS, and their 'double health', bleh.
- //Set us to their health, but, human health ignores robolimbs so we do it 'the hard way'
- health = maxHealth - humanform.getOxyLoss() - humanform.getToxLoss() - humanform.getCloneLoss() - humanform.getActualFireLoss() - humanform.getActualBruteLoss()
+ if(!humanform)
+ return ..()
- //Alive, becoming dead
- if((stat < DEAD) && (health <= 0))
- death()
+ //Set the max
+ maxHealth = humanform.getMaxHealth()*2 //HUMANS, and their 'double health', bleh.
+ //Set us to their health, but, human health ignores robolimbs so we do it 'the hard way'
+ health = maxHealth - humanform.getOxyLoss() - humanform.getToxLoss() - humanform.getCloneLoss() - humanform.getActualFireLoss() - humanform.getActualBruteLoss()
- //Overhealth
- if(health > getMaxHealth())
- health = getMaxHealth()
+ //Alive, becoming dead
+ if((stat < DEAD) && (health <= 0))
+ death()
- //Update our hud if we have one
- if(healths)
- if(stat != DEAD)
- var/heal_per = (health / getMaxHealth()) * 100
- switch(heal_per)
- if(100 to INFINITY)
- healths.icon_state = "health0"
- if(80 to 100)
- healths.icon_state = "health1"
- if(60 to 80)
- healths.icon_state = "health2"
- if(40 to 60)
- healths.icon_state = "health3"
- if(20 to 40)
- healths.icon_state = "health4"
- if(0 to 20)
- healths.icon_state = "health5"
- else
- healths.icon_state = "health6"
- else
- healths.icon_state = "health7"
- else
- ..()
+ //Overhealth
+ if(health > getMaxHealth())
+ health = getMaxHealth()
+ //Grab any other interesting values
+ confused = humanform.confused
+ radiation = humanform.radiation
+ paralysis = humanform.paralysis
+
+ //Update our hud if we have one
+ if(healths)
+ if(stat != DEAD)
+ var/heal_per = (health / getMaxHealth()) * 100
+ switch(heal_per)
+ if(100 to INFINITY)
+ healths.icon_state = "health0"
+ if(80 to 100)
+ healths.icon_state = "health1"
+ if(60 to 80)
+ healths.icon_state = "health2"
+ if(40 to 60)
+ healths.icon_state = "health3"
+ if(20 to 40)
+ healths.icon_state = "health4"
+ if(0 to 20)
+ healths.icon_state = "health5"
+ else
+ healths.icon_state = "health6"
+ else
+ healths.icon_state = "health7"
+
+// All the damage and such to the blob translates to the human
/mob/living/simple_mob/protean_blob/adjustBruteLoss(var/amount)
if(humanform)
- humanform.adjustBruteLoss(amount)
+ return humanform.adjustBruteLoss(amount)
else
- ..()
+ return ..()
/mob/living/simple_mob/protean_blob/adjustFireLoss(var/amount)
if(humanform)
- humanform.adjustFireLoss(amount)
+ return humanform.adjustFireLoss(amount)
else
- ..()
+ return ..()
+
+/mob/living/simple_mob/protean_blob/adjustToxLoss(amount)
+ if(humanform)
+ return humanform.adjustToxLoss(amount)
+ else
+ return ..()
+
+/mob/living/simple_mob/protean_blob/adjustOxyLoss(amount)
+ if(humanform)
+ return humanform.adjustOxyLoss(amount)
+ else
+ return ..()
+
+/mob/living/simple_mob/protean_blob/adjustHalLoss(amount)
+ if(humanform)
+ return humanform.adjustHalLoss(amount)
+ else
+ return ..()
+
+/mob/living/simple_mob/protean_blob/emp_act(severity)
+ if(humanform)
+ return humanform.emp_act(severity)
+ else
+ return ..()
+
+/mob/living/simple_mob/protean_blob/ex_act(severity)
+ if(humanform)
+ return humanform.ex_act(severity)
+ else
+ return ..()
+
+/mob/living/simple_mob/protean_blob/rad_act(severity)
+ if(humanform)
+ return humanform.ex_act(severity)
+ else
+ return ..()
+
+/mob/living/simple_mob/protean_blob/bullet_act(obj/item/projectile/P)
+ if(humanform)
+ return humanform.bullet_act(P)
+ else
+ return ..()
/mob/living/simple_mob/protean_blob/death(gibbed, deathmessage = "dissolves away, leaving only a few spare parts!")
if(humanform)
- humanform.death(gibbed = gibbed)
- for(var/organ in humanform.internal_organs)
- var/obj/item/organ/internal/O = organ
- O.removed()
- O.forceMove(drop_location())
- var/list/items = humanform.get_equipped_items()
- if(prev_left_hand) items += prev_left_hand
- if(prev_right_hand) items += prev_right_hand
- for(var/obj/object in items)
- object.forceMove(drop_location())
- QDEL_NULL(humanform) //Don't leave it just sitting in nullspace
-
- animate(src,alpha = 0,time = 2 SECONDS)
- sleep(2 SECONDS)
- qdel(src)
-
- ..()
+ humanform.death(gibbed, deathmessage)
+ else
+ animate(src, alpha = 0, time = 2 SECONDS)
+ sleep(2 SECONDS)
+
+ if(!QDELETED(src)) // Human's handle death should have taken us, but maybe we were adminspawned or something without a human counterpart
+ qdel(src)
/mob/living/simple_mob/protean_blob/Life()
. = ..()
diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_species.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_species.dm
index dfcb66dcb7..adc20e6f4e 100755
--- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_species.dm
+++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_species.dm
@@ -162,10 +162,23 @@
return rgb(80,80,80,230)
/datum/species/protean/handle_death(var/mob/living/carbon/human/H)
- to_chat(H,"You died as a Protean. Please sit out of the round for at least 60 minutes before respawning, to represent the time it would take to ship a new-you to the station.")
- spawn(1) //This spawn is here so that if the protean_blob calls qdel, it doesn't try to gib the humanform.
- if(H)
- H.gib()
+ if(!H)
+ return // Iono!
+
+ if(H.temporary_form)
+ H.forceMove(H.temporary_form.drop_location())
+ H.ckey = H.temporary_form.ckey
+ QDEL_NULL(H.temporary_form)
+
+ to_chat(H, "You died as a Protean. Please sit out of the round for at least 60 minutes before respawning, to represent the time it would take to ship a new-you to the station.")
+
+ for(var/obj/item/organ/I in H.internal_organs)
+ I.removed()
+
+ for(var/obj/item/I in src)
+ H.drop_from_inventory(I)
+
+ qdel(H)
/datum/species/protean/handle_environment_special(var/mob/living/carbon/human/H)
if((H.getActualBruteLoss() + H.getActualFireLoss()) > H.maxHealth*0.5 && isturf(H.loc)) //So, only if we're not a blob (we're in nullspace) or in someone (or a locker, really, but whatever)
diff --git a/code/modules/mob/mob_defines_vr.dm b/code/modules/mob/mob_defines_vr.dm
index 48273ec211..1c6e19ac78 100644
--- a/code/modules/mob/mob_defines_vr.dm
+++ b/code/modules/mob/mob_defines_vr.dm
@@ -7,4 +7,9 @@
var/obj/screen/shadekin/darkness/shadekin_dark_display = null
var/obj/screen/shadekin/energy/shadekin_energy_display = null
- var/obj/screen/xenochimera/danger_level/xenochimera_danger_display = null
\ No newline at end of file
+ var/obj/screen/xenochimera/danger_level/xenochimera_danger_display = null
+
+/mob/drop_location()
+ if(temporary_form)
+ return temporary_form.drop_location()
+ return ..()
\ No newline at end of file
diff --git a/code/modules/vore/eating/belly_obj_vr.dm b/code/modules/vore/eating/belly_obj_vr.dm
index 373da4d551..fb0bdcb726 100644
--- a/code/modules/vore/eating/belly_obj_vr.dm
+++ b/code/modules/vore/eating/belly_obj_vr.dm
@@ -168,9 +168,8 @@
/obj/belly/Destroy()
STOP_PROCESSING(SSbellies, src)
- if(owner)
- owner.vore_organs -= src
- owner = null
+ owner?.vore_organs?.Remove(src)
+ owner = null
return ..()
// Called whenever an atom enters this belly