From baf5150c510d2f17e7d806d1a79f74b4cf9611d1 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Wed, 1 Apr 2020 22:35:26 -0700 Subject: [PATCH] fixes two runtimes --- code/modules/mob/living/living_defense.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 0dc2148137..b2664ab62c 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -104,13 +104,14 @@ return FALSE /mob/living/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum) + // Throwingdatum can be null if someone had an accident() while slipping with an item in hand. var/obj/item/I var/throwpower = 30 if(isitem(AM)) I = AM throwpower = I.throwforce var/impacting_zone = ran_zone(BODY_ZONE_CHEST, 65)//Hits a random part of the body, geared towards the chest - if(run_block(AM, throwpower, "\the [AM.name]", ATTACK_TYPE_THROWN, throwingdatum.thrower, impacting_zone) & BLOCK_SUCCESS) + if(run_block(AM, throwpower, "\the [AM.name]", ATTACK_TYPE_THROWN, 0, throwingdatum?.thrower, impacting_zone) & BLOCK_SUCCESS) hitpush = FALSE skipcatch = TRUE blocked = TRUE