From 420e01515ffad107a47d7788de3e9c59e76db857 Mon Sep 17 00:00:00 2001 From: endipe <170849376+endipe@users.noreply.github.com> Date: Tue, 13 Aug 2024 21:50:28 +0300 Subject: [PATCH] bugfix: arrhythmic knife speed (#5695) * fix * Update holy_weapons.dm * Update holy_weapons.dm --- code/game/objects/items/weapons/holy_weapons.dm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm index 4f078751e5f..8557ba1a85e 100644 --- a/code/game/objects/items/weapons/holy_weapons.dm +++ b/code/game/objects/items/weapons/holy_weapons.dm @@ -472,6 +472,7 @@ pickup_sound = 'sound/items/handling/knife_pickup.ogg' drop_sound = 'sound/items/handling/knife_drop.ogg' attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") + var/mob/living/carbon/wielder /obj/item/nullrod/tribal_knife/New() ..() @@ -479,15 +480,21 @@ /obj/item/nullrod/tribal_knife/Destroy() STOP_PROCESSING(SSobj, src) + wielder = null return ..() /obj/item/nullrod/tribal_knife/process() slowdown = rand(-2, 2) if(iscarbon(loc)) - var/mob/living/carbon/wielder = loc + wielder = loc if(wielder.is_in_hands(src)) wielder.update_equipment_speed_mods() +/obj/item/nullrod/tribal_knife/dropped(mob/user, slot, silent = FALSE) + slowdown = 0 + user.update_equipment_speed_mods() + . = ..() + /obj/item/nullrod/pitchfork name = "unholy pitchfork" icon_state = "pitchfork0"