Merge pull request #14021 from DeltaFire15/emp-fuckeroni
Fixes combat mode being permanently disabled under specific circumstances
This commit is contained in:
@@ -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
|
/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)
|
SHOULD_CALL_PARENT(TRUE)
|
||||||
REMOVE_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, src)
|
if(blocks_combatmode)
|
||||||
REMOVE_TRAIT(owner, TRAIT_SPRINT_LOCKED, src)
|
REMOVE_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, src)
|
||||||
|
if(blocks_sprint)
|
||||||
|
REMOVE_TRAIT(owner, TRAIT_SPRINT_LOCKED, src)
|
||||||
return TRUE
|
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
|
/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)
|
owner.clear_alert(id)
|
||||||
LAZYREMOVE(owner.status_effects, src)
|
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
|
owner = null
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user