From a3c60b69b28aabbd605abaedd916b99a8723a40c Mon Sep 17 00:00:00 2001 From: MX0739 <176184752+MX0739@users.noreply.github.com> Date: Thu, 23 Jan 2025 21:12:11 +0300 Subject: [PATCH] Fixes weird baseball bat interaction with objects with throw_range 0 (boulders) (#89168) ## About The Pull Request Set the minimum flight distance to 3 tiles for objects hit by baseball bat parry, so instead of the boulder being sucked into wielder when the baseball bat hits it, it now bounces back a little. ## Why It's Good For The Game Closes https://github.com/tgstation/tgstation/issues/87877 ## Changelog :cl: fix: objects with throw_range 0 now properly parried with baseball bats /:cl: --- code/game/objects/items/weaponry.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 0e85af8e532..86fe351239c 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -1025,7 +1025,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 angle = 180 if(target.dir & target_to_user) angle = 360 - var/turf/return_to_sender = get_ranged_target_turf_direct(user, throw_datum.starting_turf, round(target.throw_range * 1.5, 1), offset = angle + (rand(-1, 1) * 10)) + var/turf/return_to_sender = get_ranged_target_turf_direct(user, throw_datum.starting_turf, max(3, round(target.throw_range * 1.5, 1)), offset = angle + (rand(-1, 1) * 10)) throw_datum.finalize(hit = FALSE) target.mouse_opacity = MOUSE_OPACITY_TRANSPARENT //dont mess with our ball target.color = list(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,3) //make them super light