diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 29a97d918c4..dcf5dc51771 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -122,7 +122,6 @@ add_splatter_floor(location) if(get_dist(user, src) <= 1) //people with TK won't get smeared with blood user.add_mob_blood(src) - return TRUE //successful attack /mob/living/simple_animal/attacked_by(obj/item/I, mob/living/user) if(!I.force) diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index 3414c096764..0574719fe9f 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -617,22 +617,23 @@ icon_state = "chainsaw0" /obj/item/twohanded/chainsaw/attack(mob/living/target, mob/living/user) + . = ..() if(wielded) playsound(loc, 'sound/weapons/chainsaw.ogg', 100, 1, -1) //incredibly loud; you ain't goin' for stealth with this thing. Credit to Lonemonk of Freesound for this sound. - if(isrobot(target)) - ..() - return - if(!isliving(target)) - return - else - if(target.stat != DEAD) - user.apply_status_effect(STATUS_EFFECT_CHAINSAW_SLAYING) - if(isnull(..())) // attack returns null if the attack was successful, (against humans) - target.KnockDown(8 SECONDS) + if(isnull(.)) //necessary check, successful attacks return null, without it target will drop any shields they may have before they get a chance to block + target.KnockDown(8 SECONDS) + +/obj/item/twohanded/chainsaw/afterattack(mob/living/target, mob/living/user, proximity) + if(!proximity) //only works on adjacent targets, no telekinetic chainsaws return - else - playsound(loc, "swing_hit", 50, 1, -1) - return ..() + if(!wielded) + return + if(isrobot(target)) //no buff from attacking robots + return + if(!isliving(target)) //no buff from attacking inanimate objects + return + if(target.stat != DEAD) //no buff from attacking dead targets + user.apply_status_effect(STATUS_EFFECT_CHAINSAW_SLAYING) /obj/item/twohanded/chainsaw/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) if(attack_type == PROJECTILE_ATTACK)