Skip to content

Commit

Permalink
Fix for Resource Score Logging
Browse files Browse the repository at this point in the history
- Fixes error where built-in team count isn't yet defined
  • Loading branch information
data-bomb committed May 4, 2024
1 parent b5315aa commit 56fe067
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Si_Logging/Si_Logging.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ You should have received a copy of the GNU General Public License
using System.Diagnostics;
using System.IO;

[assembly: MelonInfo(typeof(HL_Logging), "Half-Life Logger", "1.2.5", "databomb&zawedcvg", "https://github.com/data-bomb/Silica")]
[assembly: MelonInfo(typeof(HL_Logging), "Half-Life Logger", "1.2.6", "databomb&zawedcvg", "https://github.com/data-bomb/Silica")]
[assembly: MelonGame("Bohemia Interactive", "Silica")]
[assembly: MelonOptionalDependencies("Admin Mod")]

Expand All @@ -51,8 +51,8 @@ namespace Si_Logging
// https://developer.valvesoftware.com/wiki/HL_Log_Standard
public class HL_Logging : MelonMod
{
const int MaxTeams = 3;
static int[] teamResourcesCollected = new int[Team.NumTeams];
const int MaxPlayableTeams = 3;
static int[] teamResourcesCollected = new int[MaxPlayableTeams + 1];
static Player?[]? lastCommander;

static MelonPreferences_Category _modCategory = null!;
Expand Down Expand Up @@ -157,8 +157,8 @@ public override void OnInitializeMelon()
AddFirstLogLine();
}

lastCommander = new Player?[MaxTeams];
for (int i = 0; i < MaxTeams; i++)
lastCommander = new Player?[MaxPlayableTeams];
for (int i = 0; i < MaxPlayableTeams; i++)
{
lastCommander[i] = null;
}
Expand Down

0 comments on commit 56fe067

Please sign in to comment.