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.

This commit is contained in:
Useroth
2019-05-18 21:40:43 +02:00
parent d2f7b961d9
commit a92abcbb96

View File

@@ -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("<span class='warning'>[user] is trying to crush [M]\s head with \the [src]!</span>")
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