diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 9d7659791ce..1e0b83f6ffd 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -344,6 +344,8 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s var/datum/action/A = X A.Remove(user) if(DROPDEL & flags) + //Prevents infinite loops where Destroy() calls an objects dropped() function + flags &= ~DROPDEL qdel(src) // called just as an item is picked up (loc is not yet changed) @@ -589,4 +591,4 @@ obj/item/proc/item_action_slot_check(slot, mob/user) //when an item modify our speech spans when in our active hand. Override this to modify speech spans. /obj/item/proc/get_held_item_speechspans(mob/living/carbon/user) - return \ No newline at end of file + return diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 0821369f929..8de22d32685 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -305,6 +305,9 @@ if(del_on_death) ghostize() stat = DEAD + //Prevent infinite loops if the mob Destroy() is overriden in such + //a manner as to cause a call to death() again + del_on_death = FALSE qdel(src) return else