From b928ee36581df4b197491d9ec171731b558a897a Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Mon, 24 Feb 2025 15:55:59 -0500 Subject: [PATCH] Tuck bat away if `batter` is `nil` --- src/main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.lua b/src/main.lua index 82b6f0c..ebd60fe 100644 --- a/src/main.lua +++ b/src/main.lua @@ -392,8 +392,8 @@ function Game:updateBatting(batDeg, batSpeed) local batAngle = math.rad(batDeg) -- TODO: animate bat-flip or something local batter = self.baserunning.batter - self.state.batBase.x = batter and (batter.x + C.BatterHandPos.x) or 0 - self.state.batBase.y = batter and (batter.y + C.BatterHandPos.y) or 0 + self.state.batBase.x = batter and (batter.x + C.BatterHandPos.x) or -999 + self.state.batBase.y = batter and (batter.y + C.BatterHandPos.y) or -999 self.state.batTip.x = self.state.batBase.x + (C.BatLength * math.sin(batAngle)) self.state.batTip.y = self.state.batBase.y + (C.BatLength * math.cos(batAngle))