Skip to content

Commit

Permalink
Skip Team Balance Checks at End of Round
Browse files Browse the repository at this point in the history
- After the game is over then there isn't a need to check for team balance, so this skips those checks
  • Loading branch information
data-bomb committed Jul 7, 2024
1 parent a8274ce commit a7c23ca
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Si_BasicTeamBalance/Si_BasicTeamBalance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit a7c23ca

Please sign in to comment.