解决消息处理bug

This commit is contained in:
lishuo committed 2021-12-21 10:10:05 +08:00
1 parent 348552b0bc
commit 939084b074
3 files changed
+13 -7

No files matched your search

@@ -303,7 +303,7 @@ namespace Assets.Scenes.Ride.Scripts
return result;
}
public static List<OnlineUser> GetOnlineUserList()
public static List<OnlineUser> GetAllOnlineUserList()
{
var result = onlineUserHelper.OnlineUsers.Where(c => !c.IsSelf).ToList();
return result;
@@ -325,6 +325,11 @@ namespace Assets.Scenes.Ride.Scripts
}
public static int GetNearRiderCount()
{
return onlineUserHelper.OnlineUsers.Where(c=> (c.Point[0] != 0 && c.Point[1] != 0)|| (c.Point[0] != -1 && c.Point[1] != -1)).Count();
}
public static int GetAllOnlineUserCount()
{
return onlineUserHelper.OnlineUsers.Count();
}
@@ -484,7 +489,7 @@ namespace Assets.Scenes.Ride.Scripts
var list = mes.ToList();
//去除自己的数据和命令包
//mes.RemoveAll(item => item.MemberId == App.CurrentUser.Id || item.Point[0] == 0);
list.RemoveAll(item => item.Point[0] == 0 && item.Point[1] == 0);
//list.RemoveAll(item => item.Point[0] == 0 && item.Point[1] == 0);
//去除重复数据
list = list.Distinct(new OlineUserComparer()).ToList();