Beispiel #1
0
 public override void Connected(BoltConnection connection)
 {
     if (BoltNetwork.isServer)
     {
         if (CoopKick.IsBanned(connection.RemoteEndPoint.SteamId))
         {
             connection.Disconnect(new CoopKickToken
             {
                 Banned      = true,
                 KickMessage = "Host banned you from his games"
             });
         }
         else
         {
             ClientACK.Create(connection).Send();
         }
     }
     if (!CoopPeerStarter.DedicatedHost && Scene.HudGui && Scene.HudGui.MpPlayerList && Scene.HudGui.MpPlayerList.gameObject && Scene.HudGui.MpPlayerList.gameObject.activeInHierarchy)
     {
         Scene.HudGui.MpPlayerList.Refresh();
     }
 }
Beispiel #2
0
 public override void Connected(BoltConnection connection)
 {
     if (BoltNetwork.isServer)
     {
         if (CoopKick.IsBanned(connection.RemoteEndPoint.SteamId))
         {
             Debug.Log("TELL CLIENT HE WAS BANNED");
             connection.Disconnect(new CoopKickToken
             {
                 Banned      = true,
                 KickMessage = "HOST_BANNED_YOU"
             });
         }
         else
         {
             ClientACK.Create(connection).Send();
             CoopTreeGrid.TodoPlayerSweeps.Add(connection);
         }
     }
     if (!CoopPeerStarter.DedicatedHost && Scene.HudGui && Scene.HudGui.MpPlayerList && Scene.HudGui.MpPlayerList.gameObject && Scene.HudGui.MpPlayerList.gameObject.activeInHierarchy)
     {
         Scene.HudGui.MpPlayerList.Refresh();
     }
 }
Beispiel #3
0
 public override void OnEvent(ClientACK evnt)
 {
     UnityEngine.Object.FindObjectOfType <CoopSteamClientStarter>().CancelInvoke("OnDisconnected");
     Debug.Log("ACKED, Waiting to receive plane position");
     CoopAckChecker.ACKED = true;
 }
Beispiel #4
0
 public override void OnEvent(ClientACK evnt)
 {
     UnityEngine.Object.FindObjectOfType<CoopSteamClientStarter>().CancelInvoke("OnDisconnected");
     Debug.Log("ACKED, Waiting to receive plane position");
     CoopAckChecker.ACKED = true;
 }