예제 #1
0
    private IEnumerator OnPhotonPlayerConnectedE(PhotonPlayer player)
    {
        if (PhotonNetwork.IsMasterClient)
        {
            if (AnarchyManager.PauseWindow.IsActive)
            {
                BasePV.RPC("pauseRPC", player, true);
            }

            if (Level.Name.StartsWith("Custom"))
            {
                StartCoroutine(CustomLevel.SendRPCToPlayer(player));
            }
        }

        yield return(new WaitForSeconds(1f));

        if (player.Properties[PhotonPlayerProperty.name] == null)
        {
            yield return(new WaitForSeconds(0.15f));
        }

        Log.AddLine("playerConnected", MsgType.Info, player.ID.ToString(), player.UIName.ToHTMLFormat());
        PlayerList?.Update();
        if (PhotonNetwork.IsMasterClient)
        {
            yield return(new WaitForSeconds(0.5f));

            GameModes.SendRpcToPlayer(player);
            if (GameModes.NoGuest.Enabled && player.UIName.RemoveHex().ToUpper().StartsWith("GUEST"))
            {
                AntisManager.Response(player.ID, false, "Anti-Guest");
            }
            else if (BanList.Banned(player.UIName.RemoveHex()))
            {
                AntisManager.Response(player.ID, false, "Banned");
            }
        }
    }