diff --git a/code/datums/status_effects/status_effect.dm b/code/datums/status_effects/status_effect.dm index 7f1009d035..9dbbc1c469 100644 --- a/code/datums/status_effects/status_effect.dm +++ b/code/datums/status_effects/status_effect.dm @@ -74,13 +74,19 @@ /datum/status_effect/proc/on_remove() //Called whenever the buff expires or is removed; do note that at the point this is called, it is out of the owner's status_effects but owner is not yet null SHOULD_CALL_PARENT(TRUE) - REMOVE_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, src) - REMOVE_TRAIT(owner, TRAIT_SPRINT_LOCKED, src) + if(blocks_combatmode) + REMOVE_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, src) + if(blocks_sprint) + REMOVE_TRAIT(owner, TRAIT_SPRINT_LOCKED, src) return TRUE /datum/status_effect/proc/be_replaced() //Called instead of on_remove when a status effect is replaced by itself or when a status effect with on_remove_on_mob_delete = FALSE has its mob deleted owner.clear_alert(id) LAZYREMOVE(owner.status_effects, src) + if(blocks_combatmode) + REMOVE_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, src) + if(blocks_sprint) + REMOVE_TRAIT(owner, TRAIT_SPRINT_LOCKED, src) owner = null qdel(src)