From 9e69a92cc542f7c4e4388d2b64ec117b997ad4dd Mon Sep 17 00:00:00 2001 From: jenz Date: Fri, 19 Jun 2026 15:59:00 +0200 Subject: [PATCH] removed the whole spec check, just relying on not being afk --- .../scripting/unloze_player_time.sp | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/discord_verificiation/scripting/unloze_player_time.sp b/discord_verificiation/scripting/unloze_player_time.sp index 6bf9179..4753233 100644 --- a/discord_verificiation/scripting/unloze_player_time.sp +++ b/discord_verificiation/scripting/unloze_player_time.sp @@ -14,7 +14,6 @@ char g_csSID[MAXPLAYERS + 1][65]; char g_cTimeRecords[1000][128]; int g_iPlayerTimeServer[MAXPLAYERS + 1]; int g_iPlayerAFKTime; -int g_iPlayerCount_excludeSpec; int g_iPlayerRTVCapacity; int g_iAvgHour_Contribution_per_player; int g_iRtvBoost_tier; @@ -167,11 +166,6 @@ public void OnPluginStart() g_iPlayerAFKTime = cvar.IntValue; delete cvar; - ConVar cvar1; - HookConVarChange((cvar1 = CreateConVar("sm_exclude_specs_avghour", "20", "How many players must be considered active on the server before specs are included in generating the average hour count")), Cvar_playerExcludeSpec); - g_iPlayerCount_excludeSpec = cvar1.IntValue; - delete cvar1; - ConVar cvar2; HookConVarChange((cvar2 = CreateConVar("sm_rtv_avg_capacity", "5", "The capacity for how many times the average a players rtv can be worth.")), Cvar_playerRTVAverageCap); g_iPlayerRTVCapacity = cvar2.IntValue; @@ -205,11 +199,6 @@ public void Cvar_playerAFKTime(ConVar convar, const char[] oldValue, const char[ g_iPlayerAFKTime = convar.IntValue; } -public void Cvar_playerExcludeSpec(ConVar convar, const char[] oldValue, const char[] newValue) -{ - g_iPlayerCount_excludeSpec = convar.IntValue; -} - public void Cvar_playerRTVAverageCap(ConVar convar, const char[] oldValue, const char[] newValue) { g_iPlayerRTVCapacity = convar.IntValue; @@ -240,22 +229,11 @@ public int GetAveragePlayerActiveTimeServer() { int total_hours = 0; int total_players = 0; - int active_player_count = 0; - for (int i = 0; i < MaxClients; i++) - { - //checking player count before deciding if including or excluding spectators from actual average - //the purpose of this is me (jenz) not boosting the hour average insanely when the server is very empty. (i often sit spec without playing and that ruins the generated average when low population because the count gets way too high due to me) - if (IsValidClient(i) && !IsFakeClient(i) && !IsClientSourceTV(i) && !is_bot_player[i] - && (GetClientTeam(i) == CS_TEAM_T || GetClientTeam(i) == CS_TEAM_CT)) - { - active_player_count++; - } - } for (int i = 0; i < MaxClients; i++) { if (IsValidClient(i) && !IsFakeClient(i) && !IsClientSourceTV(i) && !is_bot_player[i] && GetClientIdleTime(i) < g_iPlayerAFKTime) { - if (active_player_count < g_iPlayerCount_excludeSpec && GetClientTeam(i) != CS_TEAM_T && GetClientTeam(i) != CS_TEAM_CT) + if (GetClientTeam(i) != CS_TEAM_T && GetClientTeam(i) != CS_TEAM_CT) { continue; }