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.
This commit is contained in:
HarseTheef
2021-11-29 22:51:05 -05:00
committed by GitHub
parent 6325b5c1e5
commit dc8dde9dd0
+3 -1
View File
@@ -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)