Fix initial throw to pitcher being counted as a pitch.

This commit is contained in:
Sage Vaillancourt 2025-02-19 23:48:19 -05:00
parent 56a5e197cd
commit d77675b0cb
1 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,7 @@ function Game.new(settings, announcer, fielding, baserunning, npc, state)
battingTeam = battingTeam,
offenseState = C.Offense.batting,
inning = 1,
pitchIsOver = false,
pitchIsOver = true,
didSwing = false,
battingTeamSprites = settings.awayTeamSprites,
fieldingTeamSprites = settings.homeTeamSprites,
@ -531,7 +531,7 @@ function Game:updateGameState()
end
end
else
self:pitch(C.PitchFlyMs / self.npc:pitchSpeed(), 2)
self:pitch(C.PitchFlyMs / self.npc:pitchSpeed(), math.random(#Pitches))
end
end
elseif self.state.offenseState == C.Offense.running then