比赛场优化

This commit is contained in:
sk 2024-10-10 18:03:42 +08:00
parent 4c4af75a76
commit f0f2831ba0
1 changed files with 8 additions and 8 deletions

View File

@ -2059,17 +2059,17 @@ func (this *Tournament) OnHourTimer() {
} }
} }
for sortId := range this.players { for sortId := range this.players {
has := false
for _, tm := range this.matches { for _, tm := range this.matches {
if _, ok := tm[sortId]; !ok { if _, ok := tm[sortId]; ok {
for _, v := range this.players[sortId] { has = true
if v != nil { break
logger.Logger.Errorf("比赛异常,比赛已经不存在了 %v", v.tm)
}
break
}
this.StopMatch(0, sortId)
} }
} }
if !has {
logger.Logger.Errorf("比赛异常,比赛已经不存在了 %v", sortId)
delete(this.players, sortId)
}
} }
} }