From dccaa72ee19ab31539a9a8f19e60e99a8e6b1fb2 Mon Sep 17 00:00:00 2001 From: aceld Date: Mon, 3 Jun 2019 14:25:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=A7=86=E9=87=8E=E6=B6=88?= =?UTF-8?q?=E5=A4=B1=E5=92=8C=E8=A7=86=E9=87=8E=E8=BF=9B=E5=85=A5=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E7=AB=AF=E5=90=8C=E6=97=B6=E6=B8=B2=E6=9F=93=E5=A4=9A?= =?UTF-8?q?=E7=8E=A9=E5=AE=B6=E9=81=97=E6=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zinx_app_demo/mmo_game/core/player.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zinx_app_demo/mmo_game/core/player.go b/zinx_app_demo/mmo_game/core/player.go index 2c4b5ee..f94fd9a 100644 --- a/zinx_app_demo/mmo_game/core/player.go +++ b/zinx_app_demo/mmo_game/core/player.go @@ -5,6 +5,7 @@ import ( "github.com/golang/protobuf/proto" "math/rand" "sync" + "time" "zinx/ziface" "zinx/zinx_app_demo/mmo_game/pb" ) @@ -239,6 +240,7 @@ func (p *Player) OnExchangeAoiGrid(oldGid, newGid int) error { Pid: player.Pid, } p.SendMsg(201, another_offline_msg) + time.Sleep(200 * time.Millisecond) } } @@ -287,6 +289,7 @@ func (p *Player) OnExchangeAoiGrid(oldGid, newGid int) error { }, } + time.Sleep(200 * time.Millisecond) p.SendMsg(200, another_online_msg) } }