diff --git a/mapchooser_extended/scripting/rockthevote_extended_avg.sp b/mapchooser_extended/scripting/rockthevote_extended_avg.sp index aa6cea0..c92b444 100755 --- a/mapchooser_extended/scripting/rockthevote_extended_avg.sp +++ b/mapchooser_extended/scripting/rockthevote_extended_avg.sp @@ -201,6 +201,10 @@ public int Native_GetRtvPercentageForClient(Handle plugin, int numParams) UpdateRTV(); int player_worth_rtv = GetPlayerWorthRTV_boost_(client); + if (player_worth_rtv < 1) + { + player_worth_rtv = 1; + } return player_worth_rtv; } @@ -209,7 +213,7 @@ void update_g_VotesNeeded() int iVoters = 0; for (int i=1; i<=MaxClients; i++) { - if (IsClientInGame(i) && !IsFakeClient(i) && !is_bot_player[i]) + if (IsClientInGame(i) && !IsFakeClient(i) && !is_bot_player[i] && PM_IsPlayerSteam(i)) { if (GetClientIdleTime(i) >= g_Cvar_AFKTime.IntValue) continue; @@ -250,6 +254,10 @@ public int get_voted_rtv() if (IsValidClient(i) && g_Voted[i]) { int player_worth_boost = GetPlayerWorthRTV_boost_(i); + if (player_worth_boost < 1) + { + player_worth_boost = 1; + } Votes += player_worth_boost; } } @@ -481,7 +489,7 @@ public Action Command_DebugRTV(int client, int args) for (int i=1; i<=MaxClients; i++) { - if (IsClientInGame(i) && !IsFakeClient(i) && !is_bot_player[i]) + if (IsClientInGame(i) && !IsFakeClient(i) && !is_bot_player[i] && PM_IsPlayerSteam(i)) { if (GetClientIdleTime(i) >= g_Cvar_AFKTime.IntValue) continue;