Exemplo n.º 1
0
        static void Postfix()
        {
            if (MenuManager.m_menu_sub_state != MenuSubState.ACTIVE || NetworkManager.IsHeadless() || !UIManager.PushedSelect(100) ||
                UIManager.m_menu_selection != 2)
            {
                return;
            }
            MenuManager.PlaySelectSound();
            UIManager.DestroyAll();

            NetworkMatch.SetNetworkGameClientMode(NetworkMatch.NetworkGameClientMode.Invalid);
            NetworkMatch.SetNetworkGameClientMode(NetworkMatch.NetworkGameClientMode.LocalLAN);
            MenuManager.ClearMpStatus();

            if (NetworkMatch.m_match_req_password == "")
            {
                //MenuManager.m_updating_pm_settings = true;
                //MenuManager.ChangeMenuState(MenuState.MP_LOCAL_MATCH);

                //var pmd = (PrivateMatchDataMessage)typeof(MenuManager).GetMethod("BuildPrivateMatchData", BindingFlags.NonPublic | BindingFlags.Static).Invoke(null, new object[] { false });
                //NetworkMatch.StartPrivateLobby(pmd);
                //MenuManager.m_updating_pm_settings = true;
                MenuManager.ChangeMenuState(MenuState.MP_LOCAL_MATCH);
            }
            else
            {
                MenuManager.m_mp_status = Loc.LS("JOINING " + MPInternet.ClientModeName());
                NetworkMatch.JoinPrivateLobby(MPInternet.MenuPassword);
            }
        }
Exemplo n.º 2
0
        static void Postfix()
        {
            if (MenuManager.m_menu_sub_state != MenuSubState.ACTIVE || NetworkManager.IsHeadless() || !UIManager.PushedSelect(100) ||
                UIManager.m_menu_selection != 2)
            {
                return;
            }
            MenuManager.PlaySelectSound();
            UIManager.DestroyAll();

            NetworkMatch.SetNetworkGameClientMode(NetworkMatch.NetworkGameClientMode.Invalid);
            NetworkMatch.SetNetworkGameClientMode(NetworkMatch.NetworkGameClientMode.LocalLAN);
            MenuManager.ClearMpStatus();

            if (NetworkMatch.m_match_req_password == "")
            {
                MenuManager.ChangeMenuState(MenuState.MP_LOCAL_MATCH);
            }
            else
            {
                MenuManager.m_mp_status = Loc.LS("JOINING " + MPInternet.ClientModeName());
                NetworkMatch.JoinPrivateLobby(MPInternet.MenuPassword);
            }
        }