diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm index 115ae3609dc..8d7ed5d88bb 100644 --- a/code/modules/multiz/movement.dm +++ b/code/modules/multiz/movement.dm @@ -545,20 +545,20 @@ var/obj/item/organ/external/l_foot = get_organ(BP_L_FOOT) var/obj/item/organ/external/r_foot = get_organ(BP_R_FOOT) - if(prob(50) && l_foot) + if(prob(50) && l_foot && l_foot.dislocated != -1) fall_message("left ankle", "bends unnaturally") l_foot.dislocate(TRUE) - else if(r_foot) + else if(r_foot && r_foot.dislocated != -1) fall_message("right ankle", "bends unnaturally") r_foot.dislocate(TRUE) else if(prob(15)) var/obj/item/organ/external/l_leg = get_organ(BP_L_LEG) var/obj/item/organ/external/r_leg = get_organ(BP_R_LEG) - if(prob(50) && l_leg) + if(prob(50) && l_leg && l_leg.dislocated != -1) fall_message("left knee", "caves in") l_leg.dislocate(TRUE) - else if(r_leg) + else if(r_leg && r_leg.dislocated != -1) fall_message("right knee", "caves in") l_leg.dislocate(TRUE) @@ -588,20 +588,20 @@ var/obj/item/organ/external/l_hand = get_organ(BP_L_HAND) var/obj/item/organ/external/r_hand = get_organ(BP_R_HAND) - if(prob(50) && l_hand) + if(prob(50) && l_hand && l_hand.dislocated != -1) fall_message("left wrist", "bends unnaturally") l_hand.dislocate(TRUE) - else if(r_hand) + else if(r_hand && r_hand.dislocated != -1) fall_message("right wrist", "bends unnaturally") r_hand.dislocate(TRUE) else if(prob(15)) var/obj/item/organ/external/l_arm = get_organ(BP_L_ARM) var/obj/item/organ/external/r_arm = get_organ(BP_R_ARM) - if(prob(50) && l_arm) + if(prob(50) && l_arm && l_arm.dislocated != -1) fall_message("left elbow", "caves in") l_arm.dislocate(TRUE) - else if(r_arm) + else if(r_arm && r_arm.dislocated != -1) fall_message("right elbow", "caves in") r_arm.dislocate(TRUE) @@ -611,7 +611,7 @@ "With a loud thud, you land on your head. Hard.", "You hear a thud!") var/obj/item/organ/external/head = get_organ(BP_HEAD) - if(prob(20) && head) + if(prob(20) && head && head.dislocated != -1) fall_message("jaw", "cracks loose") head.dislocate(TRUE) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index cfcad760f6f..54398901afa 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -187,19 +187,22 @@ ..() /obj/item/organ/external/proc/dislocate(var/primary) - if(dislocated != -1) - if(primary) - dislocated = 2 - else - dislocated = 1 + if(dislocated == -1) + return + if(primary) + dislocated = 2 + else + dislocated = 1 owner.verbs |= /mob/living/carbon/human/proc/undislocate if(children && children.len) for(var/obj/item/organ/external/child in children) child.dislocate() /obj/item/organ/external/proc/undislocate() - if(dislocated != -1) - dislocated = 0 + if(dislocated == -1) + return + + dislocated = 0 if(children && children.len) for(var/obj/item/organ/external/child in children) if(child.dislocated == 1) diff --git a/html/changelogs/johnwildkins-fallin.yml b/html/changelogs/johnwildkins-fallin.yml new file mode 100644 index 00000000000..3a09ec6ff3e --- /dev/null +++ b/html/changelogs/johnwildkins-fallin.yml @@ -0,0 +1,6 @@ +author: JohnWildkins + +delete-after: True + +changes: + - bugfix: "Fall damage no longer dislocates joints that can't normally be dislocated."