コード例 #1
0
 static void Postfix(PrivateMatchDataMessage __result)
 {
     if (__result.m_max_players_for_match == 0)
     {
         __result.m_max_players_for_match = 16;
     }
 }
コード例 #2
0
 private static void Postfix(ref bool __result, PrivateMatchDataMessage pmd, ref int ___m_num_players_to_start_match)
 {
     ApplyMatchOLModData();
     if (___m_num_players_to_start_match == 2) // always allow start with 1
     {
         ___m_num_players_to_start_match = 1;
     }
     if (!__result && !Config.NoDownload && !string.IsNullOrEmpty(pmd.m_addon_level_name_hash)) // unknown level?
     {
         MPDownloadLevel.StartGetLevel(pmd.m_addon_level_name_hash);
         __result = true;
     }
 }
コード例 #3
0
        static void Postfix(PrivateMatchDataMessage __result)
        {
            if (!Menus.mms_classic_spawns)
            {
                return;
            }

            __result.m_force_loadout = 1;
            __result.m_force_w1      = WeaponType.IMPULSE;
            __result.m_force_w2      = WeaponType.NUM;
            __result.m_force_m1      = MissileType.FALCON;
            __result.m_force_m2      = MissileType.NUM;
        }
コード例 #4
0
 static void Postfix(PrivateMatchDataMessage __result)
 {
     Debug.Log("Build PMD name jipsingle " + MPJoinInProgress.SingleMatchEnable);
     if ((MPTeams.MenuManagerTeamCount > 2 || MPJoinInProgress.MenuManagerEnabled || MPJoinInProgress.SingleMatchEnable || RearView.MPMenuManagerEnabled ||
          MPSuddenDeath.SuddenDeathMenuEnabled) &&
         MenuManager.m_mp_lan_match)
     {
         __result.m_name += new string(new char[] { '\0', (char)(
                                                        ((Math.Max(2, MPTeams.MenuManagerTeamCount) - 2) & 7) |
                                                        (MPJoinInProgress.MenuManagerEnabled || MPJoinInProgress.SingleMatchEnable ? 8 : 0) |
                                                        (RearView.MPMenuManagerEnabled ? 16 : 0) |
                                                        (MPSuddenDeath.SuddenDeathMenuEnabled ? 32 : 0)) });
     }
     Debug.Log("Build PMD name " + String.Join(",", __result.m_name.Select(x => ((int)x).ToString()).ToArray()));
     if (MPJoinInProgress.MenuManagerEnabled || MPJoinInProgress.SingleMatchEnable ||
         (MenuManager.m_mp_lan_match && MPInternet.Enabled))
     {
         __result.m_num_players_to_start = 1;
     }
     if ((int)__result.m_match_mode > (int)ExtMatchMode.CTF) // newer matchmodes are sent with ModPrivateData
     {
         __result.m_match_mode = NetworkMatch.IsTeamMode(__result.m_match_mode) ? MatchMode.TEAM_ANARCHY : MatchMode.ANARCHY;
     }
 }