Skip to content

Commit c8a6285

Browse files
committed
Disallow requesting timeout when team has none left
1 parent fb4f2e2 commit c8a6285

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/app/rcon/server_remotecontrol.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,9 @@ func (c *RemoteControlClient) checkRequestTimeout() error {
249249
if gameStateType == state.GameState_TIMEOUT {
250250
return errors.New("Timeout is active")
251251
}
252+
if *c.gcEngine.CurrentState().TeamState[c.team.String()].TimeoutsLeft <= 0 {
253+
return errors.New("No timeouts left")
254+
}
252255
return nil
253256
}
254257

0 commit comments

Comments
 (0)