Merge pull request #20525 from optimumtact/dropdelloops

Prevent infinite loops with DROPDEL items and del_on_death simple mobs
This commit is contained in:
Joan Lung
2016-09-18 15:51:49 -04:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
+3 -1
View File
@@ -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
return