diff --git a/CounterStrike2GSI/CS2GSIFile.cs b/CounterStrike2GSI/CS2GSIFile.cs index 08a3990..1eddeeb 100644 --- a/CounterStrike2GSI/CS2GSIFile.cs +++ b/CounterStrike2GSI/CS2GSIFile.cs @@ -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"; @@ -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; diff --git a/CounterStrike2GSI/GameState.cs b/CounterStrike2GSI/GameState.cs index 6f9c393..11de158 100644 --- a/CounterStrike2GSI/GameState.cs +++ b/CounterStrike2GSI/GameState.cs @@ -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")); } } } diff --git a/CounterStrike2GSI/Nodes/MapProvider/TeamStatistics.cs b/CounterStrike2GSI/Nodes/MapProvider/TeamStatistics.cs index f21ea67..1bb1dea 100644 --- a/CounterStrike2GSI/Nodes/MapProvider/TeamStatistics.cs +++ b/CounterStrike2GSI/Nodes/MapProvider/TeamStatistics.cs @@ -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() diff --git a/CounterStrike2GSI/Nodes/Provider.cs b/CounterStrike2GSI/Nodes/Provider.cs index 0deb0ef..554a7d2 100644 --- a/CounterStrike2GSI/Nodes/Provider.cs +++ b/CounterStrike2GSI/Nodes/Provider.cs @@ -28,7 +28,7 @@ public class Provider : Node public readonly string SteamID; /// - /// Timestamp of the GameState data. + /// Timestamp of the GameState data. /// public readonly int Timestamp; @@ -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; } ///