diff --git a/server/matchserver/team/matchmgr.go b/server/matchserver/team/matchmgr.go index 65b915f7..ce35ad86 100644 --- a/server/matchserver/team/matchmgr.go +++ b/server/matchserver/team/matchmgr.go @@ -81,6 +81,31 @@ func (this *matchMgr) mustBeZn(key int64) *q5.ListHead { } func (this *matchMgr) execMatch(m *matchingInfo) { + if !m.team.NeedMatchRealPlayer() { + this.oldExecMatch(m) + return + } + l := this.mustBeZn(m.team.GetZnKey()) + l.ForEach( + func (ele interface{}) bool { + if targetM, ok := ele.(*matchingInfo); ok { + if m != targetM && m.team.canMatch(targetM.team) { + m.matchOk = targetM + m.matchTick = q5.GetTickCount() + + targetM.matchOk = m + targetM.matchTick = q5.GetTickCount() + return false + } + } + return true + }) + if m.matchOk != nil { + this.onMatchOk(m) + } +} + +func (this *matchMgr) oldExecMatch(m *matchingInfo) { if q5.GetTickCount() - m.addTick > 1000 * 7 { m.entry.DelInit() f5.GetTimer().DeleteRunningTimer()