From 1501e2f17b648b0dd76a63db44ab64fd22bde91c Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 20 Sep 2024 15:30:16 +0800 Subject: [PATCH] 1 --- server/matchserver/history/historymgr.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/server/matchserver/history/historymgr.go b/server/matchserver/history/historymgr.go index 4f0475d4..3e4595a7 100644 --- a/server/matchserver/history/historymgr.go +++ b/server/matchserver/history/historymgr.go @@ -2,6 +2,7 @@ package history import ( "q5" + "f5" "cs" "jccommon" "main/common" @@ -52,8 +53,14 @@ func (this *historyMgr) PushLastBattleInfo(hum common.Player) { func (this *historyMgr) CanStart(accountId string, mapId int32, modeId int32) bool { u := this.getUser(accountId) - if u == nil { - return false + if u == nil && modeId == jccommon.MAP_MODE_CIRCUIT { + key := q5.MkInt64(mapId, modeId) + if startTime, ok := u.mapAndModeHash[key]; ok { + nowTime := q5.ToInt32(f5.GetApp().GetRealSeconds()) + if nowTime - startTime < mt.Table.Config.Get().GetCircuitModeIntervalTime() { + return false + } + } } return true }