[MIRROR] Fix organ damage being uncapped [MDB IGNORE] (#22161)

* Fix organ damage being uncapped

* Update damage_procs.dm

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Bloop <vinylspiders@gmail.com>
This commit is contained in:
SkyratBot
2023-07-18 16:52:09 -04:00
committed by GitHub
co-authored by MrMelbert Bloop
parent 3fd2f8134b
commit b262fa48ce
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -240,6 +240,7 @@ INITIALIZE_IMMEDIATE(/obj/item/organ)
/obj/item/organ/proc/apply_organ_damage(damage_amount, maximum = maxHealth, required_organ_flag = NONE) //use for damaging effects
if(!damage_amount) //Micro-optimization.
return
maximum = clamp(maximum, 0, maxHealth) // the logical max is, our max
if(maximum < damage)
return
if(required_organ_flag && !(organ_flags & required_organ_flag))