From dc8dde9dd0a12f29e5afac74ec2dbfa9806203b5 Mon Sep 17 00:00:00 2001 From: HarseTheef <74737391+HarseTheef@users.noreply.github.com> Date: Mon, 29 Nov 2021 21:51:05 -0600 Subject: [PATCH] Fixes baseball bat knockback direction (#63089) Baseball bats now establish their direction of knockback based on the cardinal direction from the atom of the bat to the target instead of the user to the target. --- code/game/objects/items/weaponry.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 06e32871213..aa75617ebcd 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -667,7 +667,9 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 . = ..() if(HAS_TRAIT(user, TRAIT_PACIFISM)) return - var/atom/throw_target = get_edge_target_turf(target, user.dir) + // we obtain the relative direction from the bat itself to the target + var/relative_direction = get_cardinal_dir(src, target) + var/atom/throw_target = get_edge_target_turf(target, relative_direction) if(homerun_ready) user.visible_message(span_userdanger("It's a home run!")) target.throw_at(throw_target, rand(8,10), 14, user)