Beispiel #1
0
    private void uLink_OnDisconnectedFromServer(NetworkDisconnection netDisconnect)
    {
        NetError lastKickReason = ServerManagement.GetLastKickReason(true);

        this.LogDisconnect(lastKickReason, new NetworkDisconnection?(netDisconnect));
        DisableOnConnectedState.OnDisconnected();
        ConsoleSystem.Run("gameui.show", false);
        this.LoadBackground();
        if (lastKickReason != NetError.NoError)
        {
            this.ShowInformation("Disconnected (" + lastKickReason.NiceString() + ")");
        }
        else
        {
            this.ShowInformation("Disconnected from server.");
        }
        LoadingScreen.Hide();
    }