Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions CounterStrike2GSI/CS2GSIFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ public static bool CreateFile(string name, string uri)
string gsifile = gsifolder + @$"gamestate_integration_{name}.cfg";

ACF provider_configuration = new ACF();

// Providers and the version this integration would like to use.
// As of 6/23/2025 all providers only offer version 1.

provider_configuration.Items["provider"] = "1";
provider_configuration.Items["tournamentdraft"] = "1";
provider_configuration.Items["map"] = "1";
Expand All @@ -64,12 +68,20 @@ public static bool CreateFile(string name, string uri)

ACF gsi_configuration = new ACF();
gsi_configuration.Items["uri"] = uri;
gsi_configuration.Items["timeout"] = "5.0";
gsi_configuration.Items["buffer"] = "0.1";
gsi_configuration.Items["throttle"] = "0.1";
gsi_configuration.Items["heartbeat"] = "10.0";
gsi_configuration.Items["timeout"] = "5.0"; // Default is 60.0, Min value 1.1
gsi_configuration.Items["buffer"] = "0.1"; // Default is 0.1, Min value 0.0
gsi_configuration.Items["throttle"] = "0.1"; // Default is 1.0, Min value 0.0
gsi_configuration.Items["heartbeat"] = "10.0"; // Default is 60.0, Min value 0.0

// Precision value adjustment for time and vector values.

gsi_configuration.Items["output/precision_time"] = "1"; // Default is 1
gsi_configuration.Items["output/precision_position"] = "2"; // Default is 2
gsi_configuration.Items["output/precision_vector"] = "2"; // Default is 2

gsi_configuration.Children["data"] = provider_configuration;


ACF gsi = new ACF();
gsi.Children[$"{name} Integration Configuration"] = gsi_configuration;

Expand Down
1 change: 1 addition & 0 deletions CounterStrike2GSI/GameState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public GameState(JObject parsed_data = null) : base(parsed_data)
AllPlayers = new AllPlayers(GetJObject("allplayers"));
AllGrenades = new AllGrenades(GetJObject("grenades"));
Bomb = new Bomb(GetJObject("bomb"));
TournamentDraft = new TournamentDraft(GetJObject("tournamentdraft"));
}
}
}
2 changes: 1 addition & 1 deletion CounterStrike2GSI/Nodes/MapProvider/TeamStatistics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ internal TeamStatistics(JObject parsed_data = null) : base(parsed_data)
Flag = GetString("flag");
ConsecutiveRoundLosses = GetInt("consecutive_round_losses");
RemainingTimeouts = GetInt("timeouts_remaining");
MatchesWonThisSeries = GetInt("timeouts_remaining");
MatchesWonThisSeries = GetInt("matches_won_this_series");
}

public override string ToString()
Expand Down
5 changes: 3 additions & 2 deletions CounterStrike2GSI/Nodes/Provider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class Provider : Node
public readonly string SteamID;

/// <summary>
/// Timestamp of the GameState data.
/// Timestamp of the GameState data.
/// </summary>
public readonly int Timestamp;

Expand Down Expand Up @@ -65,7 +65,8 @@ public override bool Equals(object obj)
Name.Equals(other.Name) &&
AppID == other.AppID &&
Version == other.Version &&
SteamID.Equals(other.SteamID);
SteamID.Equals(other.SteamID) &&
Timestamp == other.Timestamp;
}

/// <inheritdoc/>
Expand Down
Loading