Skip to content

Commit

Permalink
修正“不停的跳转场景,有一定概率导致服务器协议混乱”的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
kbengine committed Apr 9, 2016
1 parent ee1cb7d commit 1ff2560
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions KBEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1445,12 +1445,6 @@ public Int32 getAoiEntityIDFromStream(MemoryStream stream)
if(_entityIDAliasIDList.Count > 255)
{
id = stream.readInt32();

// 如果为0且客户端上一步是重登陆或者重连操作并且服务端entity在断线期间一直处于在线状态
// 则可以忽略这个错误, 因为cellapp可能一直在向baseapp发送同步消息, 当客户端重连上时未等
// 服务端初始化步骤开始则收到同步信息, 此时这里就会出错。
if(_entityIDAliasIDList.Count == 0)
return 0;
}
else
{
Expand All @@ -1459,7 +1453,7 @@ public Int32 getAoiEntityIDFromStream(MemoryStream stream)
// 如果为0且客户端上一步是重登陆或者重连操作并且服务端entity在断线期间一直处于在线状态
// 则可以忽略这个错误, 因为cellapp可能一直在向baseapp发送同步消息, 当客户端重连上时未等
// 服务端初始化步骤开始则收到同步信息, 此时这里就会出错。
if(_entityIDAliasIDList.Count == 0)
if(_entityIDAliasIDList.Count <= aliasID)
return 0;

id = _entityIDAliasIDList[aliasID];
Expand Down

0 comments on commit 1ff2560

Please sign in to comment.