Skip to content

Commit 9e0b16c

Browse files
committed
Fix: Consider removal time for yellow cards only during RUNNING
1 parent 7d4b60c commit 9e0b16c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

internal/app/engine/process_botremoved.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,13 @@ func (p *BotNumberProcessor) processBotNumber() {
3838
func (e *Engine) processBotNumberPerTeam(team state.Team) {
3939

4040
teamInfo := e.currentState.TeamState[team.String()]
41+
removalTime := e.gameConfig.YellowCardBotRemovalTime
42+
if *e.currentState.GameState.Type != state.GameState_RUNNING {
43+
removalTime = 0
44+
}
4145
newCards := newActiveYellowCards(
4246
teamInfo.YellowCards,
43-
e.gameConfig.YellowCardDuration-e.gameConfig.YellowCardBotRemovalTime,
47+
e.gameConfig.YellowCardDuration-removalTime,
4448
)
4549

4650
numBots := e.gcState.TrackerStateGc.NumTeamRobots(team)

0 commit comments

Comments
 (0)