From a92abcbb965fb72022548dea25fdbdb197850592 Mon Sep 17 00:00:00 2001 From: Useroth Date: Sat, 18 May 2019 21:40:43 +0200 Subject: [PATCH] It's always the more extreme stuff you don't notice. Moved the damage check AFTER the check whether the head exists to begin with. --- code/modules/surgery/nutcracker.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/surgery/nutcracker.dm b/code/modules/surgery/nutcracker.dm index 0526e51eca..08b75edce6 100644 --- a/code/modules/surgery/nutcracker.dm +++ b/code/modules/surgery/nutcracker.dm @@ -30,7 +30,6 @@ . = ..() var/target_zone = "head" var/obj/item/bodypart/target_limb = M.get_bodypart(target_zone) - var/crush_time = max(0, 400 - target_limb.brute_dam*2) if(!get_turf(M)) return @@ -49,6 +48,7 @@ M.visible_message("[user] is trying to crush [M]\s head with \the [src]!") + var/crush_time = max(0, 400 - target_limb.brute_dam*2) if(do_mob(user, M, crush_time)) if(get_location_accessible(M, target_zone)) //Yes, two checks, before and after the timer. What if someone puts a helmet on the guy while you're crushing his head? if(target_limb)//If he still has the head. In case you queue up a lot of these up at once or the guy loses the head while you're removing it