mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 14:08:31 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user