not checking autismbots and fakes any longer
This commit is contained in:
parent
f5804eed72
commit
2b67f52368
@ -148,9 +148,6 @@ int g_iInterval;
|
|||||||
char player_mapvote[MAXPLAYERS + 1][PLATFORM_MAX_PATH];
|
char player_mapvote[MAXPLAYERS + 1][PLATFORM_MAX_PATH];
|
||||||
MapChange g_ChangeTime;
|
MapChange g_ChangeTime;
|
||||||
|
|
||||||
//check if autismbot
|
|
||||||
bool is_bot_player[MAXPLAYERS + 1];
|
|
||||||
|
|
||||||
Handle g_NominationsResetForward = INVALID_HANDLE;
|
Handle g_NominationsResetForward = INVALID_HANDLE;
|
||||||
Handle g_MapVoteStartedForward = INVALID_HANDLE;
|
Handle g_MapVoteStartedForward = INVALID_HANDLE;
|
||||||
|
|
||||||
@ -703,7 +700,6 @@ public void OnClientPutInServer(int client)
|
|||||||
|
|
||||||
public void OnClientDisconnect(int client)
|
public void OnClientDisconnect(int client)
|
||||||
{
|
{
|
||||||
is_bot_player[client] = false;
|
|
||||||
Format(player_mapvote[client], 128, "");
|
Format(player_mapvote[client], 128, "");
|
||||||
//2023 edit for handling multiple nominations -jenz
|
//2023 edit for handling multiple nominations -jenz
|
||||||
for (int i = 0; i < GetArraySize(g_NominateList[client]); i++)
|
for (int i = 0; i < GetArraySize(g_NominateList[client]); i++)
|
||||||
@ -1597,12 +1593,10 @@ void InitiateVote(MapChange when, Handle inputlist=INVALID_HANDLE)
|
|||||||
|
|
||||||
int clients[MAXPLAYERS + 1];
|
int clients[MAXPLAYERS + 1];
|
||||||
int count = 0;
|
int count = 0;
|
||||||
//here we pick clients to show the vote to, we dont show it to autismbots & fakeclients.
|
|
||||||
for (int i = 0; i <= MaxClients; i++)
|
for (int i = 0; i <= MaxClients; i++)
|
||||||
{
|
{
|
||||||
Format(player_mapvote[i], 128, "");
|
Format(player_mapvote[i], 128, "");
|
||||||
//2023 excluding autismbots.
|
if (IsValidClient(i))
|
||||||
if (IsValidClient(i) && !is_bot_player[i])
|
|
||||||
{
|
{
|
||||||
clients[count] = i;
|
clients[count] = i;
|
||||||
count++;
|
count++;
|
||||||
@ -1636,7 +1630,7 @@ public Action Timer_Countdown(Handle timer)
|
|||||||
char picked_map[PLATFORM_MAX_PATH];
|
char picked_map[PLATFORM_MAX_PATH];
|
||||||
for (int i = 0; i <= MaxClients; i++)
|
for (int i = 0; i <= MaxClients; i++)
|
||||||
{
|
{
|
||||||
if (IsValidClient(i) && !StrEqual(player_mapvote[i], "") && !is_bot_player[i] )
|
if (IsValidClient(i) && !StrEqual(player_mapvote[i], ""))
|
||||||
{
|
{
|
||||||
if (StrEqual(player_mapvote[i], most_voted_map[0]) || StrEqual(player_mapvote[i], most_voted_map[1]) ||
|
if (StrEqual(player_mapvote[i], most_voted_map[0]) || StrEqual(player_mapvote[i], most_voted_map[1]) ||
|
||||||
StrEqual(player_mapvote[i], most_voted_map[2]))
|
StrEqual(player_mapvote[i], most_voted_map[2]))
|
||||||
@ -1663,7 +1657,7 @@ public Action Timer_Countdown(Handle timer)
|
|||||||
int voted_so_far = 0;
|
int voted_so_far = 0;
|
||||||
for (int i = 0; i <= MaxClients; i++)
|
for (int i = 0; i <= MaxClients; i++)
|
||||||
{
|
{
|
||||||
if (IsValidClient(i) && !is_bot_player[i])
|
if (IsValidClient(i))
|
||||||
{
|
{
|
||||||
total_votes += GetPlayerWorthRTV_boost_(i);
|
total_votes += GetPlayerWorthRTV_boost_(i);
|
||||||
if (!StrEqual(player_mapvote[i], ""))
|
if (!StrEqual(player_mapvote[i], ""))
|
||||||
@ -1880,7 +1874,7 @@ public void Handler_MapVoteFinished(Handle menu,
|
|||||||
int total_votes = 0;
|
int total_votes = 0;
|
||||||
for (int i = 0; i <= MaxClients; i++)
|
for (int i = 0; i <= MaxClients; i++)
|
||||||
{
|
{
|
||||||
if (IsValidClient(i) && !is_bot_player[i])
|
if (IsValidClient(i))
|
||||||
{
|
{
|
||||||
total_votes += GetPlayerWorthRTV_boost_(i);
|
total_votes += GetPlayerWorthRTV_boost_(i);
|
||||||
}
|
}
|
||||||
@ -3296,26 +3290,7 @@ stock int InternalGetMapTimeRestriction(const char[] map)
|
|||||||
|
|
||||||
public void OnClientPostAdminCheck(int client)
|
public void OnClientPostAdminCheck(int client)
|
||||||
{
|
{
|
||||||
is_bot_player[client] = false;
|
|
||||||
Format(player_mapvote[client], 128, "");
|
Format(player_mapvote[client], 128, "");
|
||||||
char auth[50];
|
|
||||||
GetClientAuthId(client, AuthId_Engine, auth, sizeof(auth));
|
|
||||||
if (StrEqual("[U:1:1221121532]", auth, false) || StrEqual("STEAM_0:0:610560766", auth, false))
|
|
||||||
{
|
|
||||||
is_bot_player[client] = true;
|
|
||||||
}
|
|
||||||
if (StrEqual("[U:1:408797742]", auth, false) || StrEqual("STEAM_0:0:204398871", auth, false))
|
|
||||||
{
|
|
||||||
is_bot_player[client] = true;
|
|
||||||
}
|
|
||||||
if (StrEqual("[U:1:1036189204]", auth, false) || StrEqual("STEAM_0:0:518094602", auth, false))
|
|
||||||
{
|
|
||||||
is_bot_player[client] = true;
|
|
||||||
}
|
|
||||||
if (StrEqual("[U:1:120378081]", auth, false) || StrEqual("STEAM_0:1:60189040", auth, false))
|
|
||||||
{
|
|
||||||
is_bot_player[client] = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// <0 = Less than MinPlayers
|
// <0 = Less than MinPlayers
|
||||||
@ -3542,7 +3517,7 @@ stock int TimeStrToSeconds(const char[] str)
|
|||||||
|
|
||||||
stock bool IsValidClient(int client)
|
stock bool IsValidClient(int client)
|
||||||
{
|
{
|
||||||
if (client > 0 && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) && !IsFakeClient(client) && !IsClientSourceTV(client))
|
if (client > 0 && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client))
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user