removed afk, fakeclient and autism bot check because it would mess too much up the main and alt candidates in zombie reloaded infectino
This commit is contained in:
parent
6959ce819c
commit
5c0bc9340f
@ -23,7 +23,6 @@ int g_iZShield[MAXPLAYERS + 1];
|
||||
bool g_bShield;
|
||||
bool g_bZombieDrown;
|
||||
|
||||
bool autismbot[MAXPLAYERS + 1];
|
||||
|
||||
bool g_Plugin_entWatch;
|
||||
|
||||
@ -146,12 +145,6 @@ public void OnClientDisconnect(int client)
|
||||
g_iZHPMax[client] = 0;
|
||||
g_iZShield[client] = 0;
|
||||
g_bMotherZM[client] = false;
|
||||
autismbot[client] = false;
|
||||
}
|
||||
|
||||
public void OnClientPostAdminCheck(int client)
|
||||
{
|
||||
is_autism_bot(client);
|
||||
}
|
||||
|
||||
/*public void ShowSettingsMenu(int client)
|
||||
@ -256,44 +249,13 @@ public Action ZR_OnClientMotherZombieEligible(int client)
|
||||
bHasItem = EW_ClientHasItem(client);
|
||||
#endif
|
||||
|
||||
if (autismbot[client])
|
||||
{
|
||||
int valid_humans = 0;
|
||||
//if less than two mother zombies should spawn dont infect bots. this is simply because of williams request
|
||||
ConVar infection_count;
|
||||
infection_count = FindConVar("zr_infect_mzombie_ratio");
|
||||
for (int clienti = 1; clienti <= MaxClients; clienti++)
|
||||
{
|
||||
if (!IsValidClient(clienti) || !IsPlayerAlive(clienti) || autismbot[clienti]) continue;
|
||||
valid_humans++;
|
||||
}
|
||||
//if less than two mother zombies can spawn dont infect the bots. requested by william that the bots are considered when infecting
|
||||
//2023 11th september: if there is only one valid_humans the autism bots should still be eligible
|
||||
//otherwise the one valid human would infinitely continue being mother zombie and round restarting duing to bots suiciding.
|
||||
if (valid_humans / infection_count.IntValue < 2 && valid_humans > 1)
|
||||
{
|
||||
return Plugin_Handled;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Plugin_Continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(GetClientIdleTime(client) > g_iAFKTime || IsFakeClient(client) || bHasItem)
|
||||
if(bHasItem)
|
||||
{
|
||||
return Plugin_Handled;
|
||||
}
|
||||
return Plugin_Continue;
|
||||
}
|
||||
|
||||
public void is_autism_bot(int client)
|
||||
{
|
||||
char sAuthID[32];
|
||||
GetClientAuthId(client, AuthId_Steam2, sAuthID, sizeof(sAuthID)); //autism bot
|
||||
autismbot[client] = StrEqual(sAuthID, "STEAM_0:1:60189040") || StrEqual(sAuthID, "STEAM_0:0:518094602") || StrEqual(sAuthID, "STEAM_0:0:204398871") || StrEqual(sAuthID, "STEAM_0:0:610560766");
|
||||
}
|
||||
|
||||
stock bool IsValidClient(int client)
|
||||
{
|
||||
if (client > 0 && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client))
|
||||
|
Loading…
Reference in New Issue
Block a user