clean up and rename

This commit is contained in:
Dogan
2019-10-06 01:33:50 +02:00
parent fd7ddd5508
commit 0f503647ed
2 changed files with 19 additions and 18 deletions
+5 -5
View File
@@ -33,7 +33,7 @@ int g_iMaxPopulation;
float g_fKnockbackPopulationBoost;
float g_fNapalmPopulationReduction;
int g_iAntiNoob;
bool g_bAntiNoob;
char g_cAntiNoobHelp[64];
char g_cAntiNoobPopulation[32];
@@ -52,7 +52,7 @@ public void OnPluginStart()
ConVar cvar;
HookConVarChange((cvar = CreateConVar("sm_an_help", "1", "1 = AntiNoob performs help, 0 = AntiNoob is disabled", FCVAR_NONE, true, 0.0, true, 1.0)), g_cvAntiNoob);
g_iAntiNoob = cvar.IntValue;
g_bAntiNoob = cvar.BoolValue;
HookConVarChange((cvar = CreateConVar("sm_an_maxplayers", "40", "max active players until the kb should be increased")), g_cvMaxPopulation);
g_iMaxPopulation = cvar.IntValue;
HookConVarChange((cvar = CreateConVar("sm_an_kb_population", "5.0", "knockback boost during low population in procent (stacks with the helps)")), g_cvKnockbackPopulationBoost);
@@ -95,7 +95,7 @@ public void OnPluginStart()
public void g_cvAntiNoob(ConVar convar, const char[] oldValue, const char[] newValue)
{
g_iAntiNoob = convar.IntValue;
g_bAntiNoob = convar.BoolValue;
}
public void g_cvMaxPopulation(ConVar convar, const char[] oldValue, const char[] newValue)
@@ -218,7 +218,7 @@ public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast)
}
}
if(g_iAntiNoob == 0)
if(!g_bAntiNoob)
{
g_cAntiNoobHelp = "{cyan}[AntiNoob]{white} Currently disabled";
g_cAntiNoobPopulation = "{white}.";
@@ -315,7 +315,7 @@ public void PerformLowHelp()
public void PerformReset()
{
if(g_bLowPopulation && g_iAntiNoob != 0)
if(g_bLowPopulation && g_bAntiNoob)
{
ServerCommand("zr_class_set_multiplier zombies knockback %f", 1.0 + g_fKnockbackPopulationBoost);
ServerCommand("zr_napalm_time_scale %f", 50.0 - g_fNapalmPopulationReduction);