From a7c23ca7ff53e05ecf1442f31057fe6f2cc0f10f Mon Sep 17 00:00:00 2001 From: data-bomb Date: Sun, 7 Jul 2024 13:03:41 -0700 Subject: [PATCH] Skip Team Balance Checks at End of Round - After the game is over then there isn't a need to check for team balance, so this skips those checks --- Si_BasicTeamBalance/Si_BasicTeamBalance.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Si_BasicTeamBalance/Si_BasicTeamBalance.cs b/Si_BasicTeamBalance/Si_BasicTeamBalance.cs index 61b6f5d..99f6a30 100644 --- a/Si_BasicTeamBalance/Si_BasicTeamBalance.cs +++ b/Si_BasicTeamBalance/Si_BasicTeamBalance.cs @@ -38,7 +38,7 @@ You should have received a copy of the GNU General Public License using SilicaAdminMod; using System.Linq; -[assembly: MelonInfo(typeof(BasicTeamBalance), "Basic Team Balance", "1.3.3", "databomb", "https://github.com/data-bomb/Silica")] +[assembly: MelonInfo(typeof(BasicTeamBalance), "Basic Team Balance", "1.3.4", "databomb", "https://github.com/data-bomb/Silica")] [assembly: MelonGame("Bohemia Interactive", "Silica")] [assembly: MelonOptionalDependencies("Admin Mod")] @@ -342,6 +342,12 @@ public static bool Prefix(MP_Strategy __instance, GameByteStreamReader __0, byte return true; } + // if the game is over then don't run any balance checks + if (GameMode.CurrentGameMode.GameOver) + { + return true; + } + // after this point we will modify the read pointers so we have to return false ulong PlayerSteam64 = __0.ReadUInt64(); CSteamID PlayerCSteamID = new CSteamID(PlayerSteam64);