This commit is contained in:
aozhiwei 2024-07-12 16:43:36 +08:00
parent 9e04f4c7d0
commit dcb522f0a5
3 changed files with 25 additions and 18 deletions

View File

@ -3,5 +3,6 @@
"friendapi_url": "http://127.0.0.1:8879", "friendapi_url": "http://127.0.0.1:8879",
"auto_start_time": 3600, "auto_start_time": 3600,
"game_start_notify_time": 20, "game_start_notify_time": 20,
"delay_delete_time": 60 "delay_delete_time": 60,
"match_real_player": 1
} }

View File

@ -87,6 +87,8 @@ func (this *matchMgr) execMatch(m *matchingInfo) {
this.oldExecMatch(m) this.oldExecMatch(m)
return return
} }
if m.team.HasOnlinePlayer() {
m.lastHasOnlinePlayerTick = q5.GetTickCount()
l := this.mustBeZn(m.team.GetZnKey()) l := this.mustBeZn(m.team.GetZnKey())
l.ForEach( l.ForEach(
func (ele interface{}) bool { func (ele interface{}) bool {
@ -105,6 +107,11 @@ func (this *matchMgr) execMatch(m *matchingInfo) {
if m.matchOk != nil { if m.matchOk != nil {
this.onMatchOk(m) this.onMatchOk(m)
} }
} else if q5.GetTickCount() - m.lastHasOnlinePlayerTick > 1000 * 60 * 30 {
this.cancelMatch(m.team)
_teamMgr.removeTeam(m.team.GetTeamUuid())
f5.GetSysLog().Info("matchMgr.execMatch team Timeout:%s", m.team.GetTeamUuid())
}
} }
func (this *matchMgr) oldExecMatch(m *matchingInfo) { func (this *matchMgr) oldExecMatch(m *matchingInfo) {

View File

@ -7,7 +7,6 @@ import (
"mt" "mt"
"main/common" "main/common"
"main/constant" "main/constant"
"jccommon"
"fmt" "fmt"
"sort" "sort"
@ -698,7 +697,7 @@ func (this *team) NeedMatchRealPlayer() bool {
if mt.Table.Config.Get().GetMatchRealPlayer() == 0 { if mt.Table.Config.Get().GetMatchRealPlayer() == 0 {
return false return false
} }
return q5.ToInt32(this.getModeId()) == jccommon.MAP_MODE_BOUNTY return q5.ToInt32(this.getModeId()) == 2
} }
func newTeam() *team { func newTeam() *team {