Merge branch 'develop' of git.pogorockgames.com:mango-games/server/game into develop

This commit is contained in:
sk 2024-04-17 17:02:23 +08:00
commit d632386936
2 changed files with 14 additions and 8 deletions

View File

@ -10,12 +10,12 @@ const (
)
const (
WaitStartTimeout = time.Second * 3 // 开始游戏
HandCardTimeout = time.Second * 1 // 发牌
PlayerOpTimeout = time.Second * 16 // 玩家操作阶段
BilledTimeout = time.Second * 1 // 结算
PlayerTotalTime = time.Minute*15 + time.Second // 下棋总时长
WaitStartTimeout = time.Second * 3 // 开始游戏
HandCardTimeout = time.Second * 1 // 发牌
PlayerOpTimeout = time.Second * 61 // 玩家操作阶段
BilledTimeout = time.Second * 1 // 结算
PlayerFirstOpTimeout = time.Second * 31
PlayerTotalTime = time.Minute*10 + time.Second // 下棋总时长
)
// 场景状态

View File

@ -1164,8 +1164,14 @@ func (this *SceneStatePlayerOp) OnTick(s *base.Scene) {
}
}
if now.Sub(sceneEx.StateStartTime) > rule.PlayerOpTimeout {
f()
if sceneEx.chess.GetRound() == 1 || sceneEx.chess.GetRound() == 2 {
if now.Sub(sceneEx.StateStartTime) > rule.PlayerFirstOpTimeout {
f()
}
} else {
if now.Sub(sceneEx.StateStartTime) > rule.PlayerOpTimeout {
f()
}
}
curPlayer := sceneEx.seats[sceneEx.GetCurOpPos()]