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) } }