diff --git a/gamerule/tienlen/constants.go b/gamerule/tienlen/constants.go index 24ff3bc..024f6a2 100644 --- a/gamerule/tienlen/constants.go +++ b/gamerule/tienlen/constants.go @@ -29,6 +29,7 @@ const ( TIenLenTianhuTimeout = time.Second * 2 // 天胡动画时长 TienLenHandNotExceedTimeLimit = time.Second * 3 //玩家没有牌可以接上家的牌,出牌时间上限 TienLenHandAutoStateTimeOut = time.Second * 1 //玩家托管出牌时间上限 + TienLenCustomWaiteStatTimeout = time.Millisecond * 1500 ) // 场景状态 diff --git a/gamesrv/tienlen/scenepolicy_tienlen.go b/gamesrv/tienlen/scenepolicy_tienlen.go index 020508a..b679abd 100644 --- a/gamesrv/tienlen/scenepolicy_tienlen.go +++ b/gamesrv/tienlen/scenepolicy_tienlen.go @@ -914,10 +914,12 @@ func (this *SceneWaitStartStateTienLen) OnTick(s *base.Scene) { } } if sceneEx.IsCustom() { - if sceneEx.CanStart() { - s.ChangeSceneState(rule.TienLenSceneStateHandCard) - } else { - s.ChangeSceneState(rule.TienLenSceneStateWaitPlayer) + if time.Now().Sub(sceneEx.StateStartTime) > rule.TienLenCustomWaiteStatTimeout { + if sceneEx.CanStart() { + s.ChangeSceneState(rule.TienLenSceneStateHandCard) + } else { + s.ChangeSceneState(rule.TienLenSceneStateWaitPlayer) + } } } }