fixed dumb mistake i guess
This commit is contained in:
parent
f4b2c416ba
commit
ad01aee1b3
47
ZombieManager/scripting/ZombieManager.sp
Normal file → Executable file
47
ZombieManager/scripting/ZombieManager.sp
Normal file → Executable file
@ -248,32 +248,33 @@ public Action ZR_OnClientMotherZombieEligible(int client)
|
|||||||
bHasItem = EW_ClientHasItem(client);
|
bHasItem = EW_ClientHasItem(client);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(GetClientIdleTime(client) > g_iAFKTime || IsFakeClient(client) || bHasItem || is_autism_bot(client))
|
if (is_autism_bot(client))
|
||||||
{
|
{
|
||||||
if (is_autism_bot(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++)
|
||||||
{
|
{
|
||||||
int valid_humans = 0;
|
if (!IsValidClient(clienti) || !IsPlayerAlive(clienti) || is_autism_bot(clienti)) continue;
|
||||||
//if less than two mother zombies should spawn dont infect bots. this is simply because of williams request
|
valid_humans++;
|
||||||
ConVar infection_count;
|
|
||||||
infection_count = FindConVar("zr_infect_mzombie_ratio");
|
|
||||||
for (int clienti = 1; clienti <= MaxClients; clienti++)
|
|
||||||
{
|
|
||||||
if (!IsValidClient(clienti) || !IsPlayerAlive(clienti) || is_autism_bot(clienti)) continue;
|
|
||||||
valid_humans++;
|
|
||||||
if (valid_humans / infection_count.IntValue > 2)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//if less than two mother zombies can spawn dont infect the bots. requested by william that the bots are considered when infecting
|
|
||||||
if (valid_humans / infection_count.IntValue < 2)
|
|
||||||
{
|
|
||||||
return Plugin_Continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
//if less than two mother zombies can spawn dont infect the bots. requested by william that the bots are considered when infecting
|
||||||
|
if (valid_humans / infection_count.IntValue < 2)
|
||||||
|
{
|
||||||
|
return Plugin_Handled;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return Plugin_Continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(GetClientIdleTime(client) > g_iAFKTime || IsFakeClient(client) || bHasItem)
|
||||||
|
{
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
}
|
}
|
||||||
return Plugin_Continue;
|
return Plugin_Continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool is_autism_bot(int client)
|
public bool is_autism_bot(int client)
|
||||||
|
Loading…
Reference in New Issue
Block a user