diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b2d1b09..ef19d9aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,14 @@ Whenever you update your Get5 plugin, remember to **always** update the `transla Please see the [installation instructions](https://splewis.github.io/get5/latest/installation/#installation) for details. +# 0.14.5 + +#### 2023-04-25 + +Bugfix. + +1. Prevent the presence of coaches in teams from messing up the stats in JSON events. + # 0.14.4 #### 2023-04-16 @@ -35,7 +43,7 @@ Hotfix of stuff that should have been in 0.14.0. # 0.14.0 -*Note: Removed from releases. Please use 0.14.3 instead. All changes below still apply.* +*Note: Removed from releases. Please use newest 0.14.x instead. All changes below still apply.* #### 2023-04-08 diff --git a/scripting/get5/stats.sp b/scripting/get5/stats.sp index 95dcac7f..6faa4a75 100644 --- a/scripting/get5/stats.sp +++ b/scripting/get5/stats.sp @@ -1070,16 +1070,16 @@ static void ConvertKeyValueStatusToJSON(const JSON_Array team) { return; } - if (g_StatsKv.GetNum(STAT_COACHING)) { - g_StatsKv.GoBack(); - return; - } - char name[MAX_NAME_LENGTH]; char auth[AUTH_LENGTH]; do { + // Don't include coaches. + if (g_StatsKv.GetNum(STAT_COACHING)) { + continue; + } + g_StatsKv.GetSectionName(auth, sizeof(auth)); g_StatsKv.GetString(STAT_NAME, name, sizeof(name)); team.PushObject(new Get5StatsPlayer( diff --git a/scripting/get5/version.sp b/scripting/get5/version.sp index 1f92eb0f..55af4645 100644 --- a/scripting/get5/version.sp +++ b/scripting/get5/version.sp @@ -1,4 +1,4 @@ -#define PLUGIN_VERSION "0.14.4-dev" +#define PLUGIN_VERSION "0.14.5-dev" // This MUST be the latest version in x.y.z semver format followed by -dev. // If this is not consistently applied, the update-checker might malfunction. // In official releases, the CI flow will remove the -dev suffix when compiling the plugin.