From 4803dfa0630d2ed3978372ef68ad70ba5876618c Mon Sep 17 00:00:00 2001 From: mwerezak Date: Mon, 14 Jul 2014 23:59:10 -0400 Subject: [PATCH] Fixes organs not being removed due to damage Because the dismemberment check was being done before brute_dam was updated, the attack that actually brought brute_dam above the threshold would not be able to pass the check, regardless of how much damage was actually done. --- code/modules/organs/organ_external.dm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index c3ba193f555..7d28f4e46be 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -91,13 +91,6 @@ brute *= brmod //~2/3 damage for ROBOLIMBS burn *= bumod //~2/3 damage for ROBOLIMBS - //If limb took enough damage, try to cut or tear it off - if(body_part != UPPER_TORSO && body_part != LOWER_TORSO) //as hilarious as it is, getting hit on the chest too much shouldn't effectively gib you. - if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier) - if( (edge && prob(5 * brute)) || (brute > 20 && prob(2 * brute)) ) - droplimb(1) - return - // High brute damage or sharp objects may damage internal organs if(internal_organs && ( (sharp && brute >= 5) || brute >= 10) && prob(5)) // Damage an internal organ @@ -162,6 +155,14 @@ // sync the organ's damage with its wounds src.update_damages() + + //If limb took enough damage, try to cut or tear it off + if(body_part != UPPER_TORSO && body_part != LOWER_TORSO) //as hilarious as it is, getting hit on the chest too much shouldn't effectively gib you. + if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier) + if( (edge && prob(5 * brute)) || (brute > 20 && prob(2 * brute)) ) + droplimb(1) + return + owner.updatehealth() var/result = update_icon()