Status effects are actually deleted/handled when the mob is deleted

This commit is contained in:
CitadelStationBot
2017-04-29 16:50:50 -05:00
parent fca3f200b3
commit fccbe18286
2 changed files with 12 additions and 3 deletions
+7
View File
@@ -29,6 +29,13 @@
med_hud_set_status()
/mob/living/Destroy()
if(LAZYLEN(status_effects))
for(var/s in status_effects)
var/datum/status_effect/S = s
if(S.on_remove_on_mob_delete) //the status effect calls on_remove when its mob is deleted
qdel(S)
else
S.be_replaced()
if(ranged_ability)
ranged_ability.remove_ranged_ability(src)
if(buckled)