From 4504afde9249fafbb8273018c5176293485b8530 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 20 Oct 2023 20:58:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E9=87=8D=E5=A4=8D=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/entertainment/room.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/modules/entertainment/room.go b/modules/entertainment/room.go index ca55da6cf..d9768f08d 100644 --- a/modules/entertainment/room.go +++ b/modules/entertainment/room.go @@ -119,10 +119,7 @@ func (this *Room) AiTimeOut(task *timewheel.Task, args ...interface{}) { szMap = append(szMap, m...) } this.player2.Score += curScore - szMap = append(szMap, &pb.MapData{ - Data: this.chessboard.Plat, - CurSocre: 0, - }) + // 清理旧的计时器 开启一个新的 if this.operatetimer != nil { timewheel.Remove(this.operatetimer) @@ -173,10 +170,7 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr curScore += score szMap = append(szMap, m...) } - szMap = append(szMap, &pb.MapData{ - Data: this.chessboard.Plat, - CurSocre: 0, - }) + //this.player2.Score += curScore // 开启新的定时器 if this.operatetimer != nil {