Refactor Get Pain (#22847)

This PR refactors get_pain() to be essentially performance free.
Previously it was a member of the top 5 most expensive procs.
I had to touch a metric shitton of files to make this happen. Notably
get_pain() was also 1/3rd of the entire processing cost for Mobs - Life
This commit is contained in:
VMSolidus
2026-08-19 22:50:40 +00:00
committed by GitHub
parent db385f9710
commit 40e88e0d2d
35 changed files with 212 additions and 119 deletions
+1 -1
View File
@@ -405,7 +405,7 @@
if(ishuman(G.affecting))
var/mob/living/carbon/human/human_shield = G.affecting
var/obj/item/organ/external/organ = human_shield.get_organ(def_zone)
if(organ.burn_dam + organ.brute_dam > organ.max_damage) //If the hit zone is above the max damage threshold, the shot hits both.
if(LIMB_GET_BURN_DAMAGE(organ) + LIMB_GET_BRUTE_DAMAGE(organ) > organ.max_damage) //If the hit zone is above the max damage threshold, the shot hits both.
penetrating += 1
projectile_piercing = PASSMOB
pierce_chance = 100