Fix match sounds after timeout.

This commit is contained in:
Patrick Fairbank
2019-09-14 13:18:08 -07:00
parent 2372cf6602
commit 969f0f1c80

View File

@@ -783,6 +783,11 @@ func (arena *Arena) handleEstop(station string, state bool) {
}
func (arena *Arena) handleSounds(matchTimeSec float64) {
if arena.MatchState == PreMatch || arena.MatchState == TimeoutActive || arena.MatchState == PostTimeout {
// Only apply this logic during a match.
return
}
for _, sound := range game.MatchSounds {
if sound.MatchTimeSec < 0 {
// Skip sounds with negative timestamps; they are meant to only be triggered explicitly.