Fixes jitteriness stacking up to insane amounts while dead (#67567)

* Jitter effect doesn't apply to dead people

* in apply, instead of create
This commit is contained in:
MrMelbert
2022-06-07 21:59:12 -04:00
committed by GitHub
parent 74b78d4deb
commit df87fb9393
@@ -8,6 +8,12 @@
return ..()
/datum/status_effect/jitter/on_apply()
// If we're being applied to a dead person, don't make the status effect.
// Just do a bit of jitter animation and be done.
if(owner.stat == DEAD)
owner.do_jitter_animation(duration / 10)
return FALSE
RegisterSignal(owner, list(COMSIG_LIVING_POST_FULLY_HEAL, COMSIG_LIVING_DEATH), .proc/remove_jitter)
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, id, /datum/mood_event/jittery)
return TRUE