From 71d5e6b1b43b64256f8ecae436e66ffe219d5836 Mon Sep 17 00:00:00 2001 From: boy2mantwicethefam <41342767+boy2mantwicethefam@users.noreply.github.com> Date: Mon, 23 Oct 2023 18:00:57 +0300 Subject: [PATCH] fix --- code/modules/mob/living/carbon/human/human_damage.dm | 2 +- code/modules/mob/living/damage_procs.dm | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index f7e0ed14c30..bee1f1fc0ef 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -379,7 +379,7 @@ This function restores all organs. damage = (damage/100)*(100-blocked) if(!ignore_events && INVOKE_EVENT(src, /event/damaged, "kind" = damagetype, "amount" = damage)) - return 0 + return 0 //This event code is also in the mob/living parent which this proc mostly overrides. switch(damagetype) if(BRUTE) diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index 5d2915544ce..7c79a8234b3 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -12,6 +12,8 @@ if(!damage) return 0 var/damage_done = (damage/100)*(100-blocked) + if(!ignore_events && INVOKE_EVENT(src, /event/damaged, "kind" = damagetype, "amount" = damage)) + return 0 switch(damagetype) if(BRUTE) adjustBruteLoss(damage_done)