From 090345b4ac47e816547ea77ef858df8607f142b9 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Wed, 25 Oct 2023 18:24:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=88=98=E5=BC=80=E5=A7=8B=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E6=BB=A1=E4=BD=93=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/entertainment/room.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/entertainment/room.go b/modules/entertainment/room.go index a91623acb..4d7fc072d 100644 --- a/modules/entertainment/room.go +++ b/modules/entertainment/room.go @@ -431,6 +431,8 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr if this.rd1 && this.rd2 { // 两个玩家都准备好了 那么就开始游戏 this.NexPower = this.player1.Uid this.curPower = this.player1.Uid + this.player1.Ps = MaxPs + this.player2.Ps = MaxPs if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "startgame", &pb.EntertainStartGamePush{ User1: this.player1, User2: this.player2, @@ -441,6 +443,7 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr }, this.szSession...); err != nil { this.Errorln(err) } + this.operatetimer = timewheel.Add(time.Second*MaxTime, this.operateTimeOut) } }