slight update requested by william
This commit is contained in:
parent
8810be50bf
commit
e1583b5bff
@ -253,14 +253,20 @@ public Action ZR_OnClientMotherZombieEligible(int client)
|
|||||||
if (is_autism_bot(client))
|
if (is_autism_bot(client))
|
||||||
{
|
{
|
||||||
int valid_humans = 0;
|
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++)
|
for (int clienti = 1; clienti <= MaxClients; clienti++)
|
||||||
{
|
{
|
||||||
if (!IsValidClient(clienti) || !IsPlayerAlive(clienti) || is_autism_bot(clienti)) continue;
|
if (!IsValidClient(clienti) || !IsPlayerAlive(clienti) || is_autism_bot(clienti)) continue;
|
||||||
valid_humans++;
|
valid_humans++;
|
||||||
if (valid_humans > 3)
|
if (valid_humans / infection_count.IntValue > 2)
|
||||||
|
{
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (4 > valid_humans > 0)
|
//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;
|
return Plugin_Continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user