AntiNoob: damn fakes

and i was wondering why my calculation wasn't working
This commit is contained in:
dogan 2020-06-19 17:31:23 +02:00
parent 457f6c33e0
commit 6b2e45f834

View File

@ -95,7 +95,7 @@ public void OnPluginStart()
g_fNapalmMidRoundReduction = cvar.FloatValue;
HookConVarChange((cvar = CreateConVar("sm_an_kb_midround", "5.0", "knockback boost in procent when mid round help is performed (stacking)")), g_cvKnockbackMidRoundBoost);
g_fKnockbackMidRoundBoost = cvar.FloatValue / 100.0;
HookConVarChange((cvar = CreateConVar("sm_an_midroundratio", "1.0", "human:zombie amount ratio to perform mid round help, x = zombie")), g_cvMidRoundRatio);
HookConVarChange((cvar = CreateConVar("sm_an_midroundratio", "1.01", "human:zombie amount ratio to perform mid round help, x = zombie")), g_cvMidRoundRatio);
g_fMidRoundRatio = cvar.FloatValue;
delete cvar;
@ -255,7 +255,7 @@ public void CheckHumanZombieCount()
for(int i = 1; i <= MaxClients; i++)
{
if(!IsClientInGame(i) || IsFakeClient(i) || !IsPlayerAlive(i))
if(!IsClientInGame(i) || !IsPlayerAlive(i))
continue;
if(GetClientTeam(i) == CS_TEAM_CT)
@ -265,8 +265,8 @@ public void CheckHumanZombieCount()
iZombieCount++;
}
if(iHumanCount == 0)
iHumanCount = 1;
if(iHumanCount == 0 || iZombieCount == 0)
return;
if(float(iZombieCount) / float(iHumanCount) >= g_fMidRoundRatio)
{