mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Merge pull request #20525 from optimumtact/dropdelloops
Prevent infinite loops with DROPDEL items and del_on_death simple mobs
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user