diff --git a/Assets/Scripts/Common/Police/CommandingCtrl.cs b/Assets/Scripts/Common/Police/CommandingCtrl.cs index 3bb1763..c6824a3 100644 --- a/Assets/Scripts/Common/Police/CommandingCtrl.cs +++ b/Assets/Scripts/Common/Police/CommandingCtrl.cs @@ -116,6 +116,14 @@ public class CommandingCtrl : MonoBehaviour { || CurrentUserInfo.role == Role.中队指挥) { CurrentUserInfo.generalCommanding = true;//设置当前登陆用户为总指挥 + + foreach (UserData item in CurrentUserInfo.room.UserList) + { + if (CurrentUserInfo.mySelf.Id != item.UserInfo.Id) + {//不发给自己 + NetworkManager.Default.SendAsync("GENERAL_COMMANDING_UPDATE_SYNC", item.UserInfo.Id); + } + } } } else diff --git a/Assets/Scripts/Common/Police/PoliceInfoMsgBind.cs b/Assets/Scripts/Common/Police/PoliceInfoMsgBind.cs index bcf99f0..ee2ebb5 100644 --- a/Assets/Scripts/Common/Police/PoliceInfoMsgBind.cs +++ b/Assets/Scripts/Common/Police/PoliceInfoMsgBind.cs @@ -191,7 +191,15 @@ public class PoliceInfoMsgBind : MonoBehaviour if (Uids.Count == 0) { - CurrentUserInfo.generalCommanding = true; + CurrentUserInfo.generalCommanding = true;//设置当前登陆用户为总指挥 + + foreach (UserData item in CurrentUserInfo.room.UserList) + { + if (CurrentUserInfo.mySelf.Id != item.UserInfo.Id) + {//不发给自己 + NetworkManager.Default.SendAsync("GENERAL_COMMANDING_UPDATE_SYNC", item.UserInfo.Id); + } + } } else { @@ -251,7 +259,15 @@ public class PoliceInfoMsgBind : MonoBehaviour if (Uids.Count == 0) { - CurrentUserInfo.generalCommanding = true; + CurrentUserInfo.generalCommanding = true;//设置当前登陆用户为总指挥 + + foreach (UserData item in CurrentUserInfo.room.UserList) + { + if (CurrentUserInfo.mySelf.Id != item.UserInfo.Id) + {//不发给自己 + NetworkManager.Default.SendAsync("GENERAL_COMMANDING_UPDATE_SYNC", item.UserInfo.Id); + } + } } else {