should prevent webclient from being mother zombie on maps where only 1-2 zms spawn
This commit is contained in:
parent
ee18f49be0
commit
5986bedc42
@ -4,6 +4,7 @@
|
|||||||
#include <basecomm>
|
#include <basecomm>
|
||||||
#include <ccc>
|
#include <ccc>
|
||||||
#include <clientprefs>
|
#include <clientprefs>
|
||||||
|
#tryinclude <zombiereloaded>
|
||||||
#include <selfmute>
|
#include <selfmute>
|
||||||
#include <voice>
|
#include <voice>
|
||||||
|
|
||||||
@ -16,6 +17,8 @@ Handle g_hCookieTorchMuted = null;
|
|||||||
bool g_bWasChecked[MAXPLAYERS + 1];
|
bool g_bWasChecked[MAXPLAYERS + 1];
|
||||||
bool g_bWebclient[MAXPLAYERS + 1];
|
bool g_bWebclient[MAXPLAYERS + 1];
|
||||||
|
|
||||||
|
bool g_bSkipInfection = false;
|
||||||
|
|
||||||
public Plugin myinfo =
|
public Plugin myinfo =
|
||||||
{
|
{
|
||||||
name = "NoSteam CELT Voice override",
|
name = "NoSteam CELT Voice override",
|
||||||
@ -67,6 +70,7 @@ public Action check_mutes(Handle timer, any data)
|
|||||||
OnClientAuthorized(i, dummy);
|
OnClientAuthorized(i, dummy);
|
||||||
set_webclient_listen_override(i);
|
set_webclient_listen_override(i);
|
||||||
g_bWebclient[i] = true;
|
g_bWebclient[i] = true;
|
||||||
|
g_bSkipInfection = GetConVarInt(FindConVar("zr_infect_mzombie_ratio")) > 10 ? true : false;
|
||||||
}
|
}
|
||||||
for (int j = 1; j <= MaxClients; j++)
|
for (int j = 1; j <= MaxClients; j++)
|
||||||
{
|
{
|
||||||
@ -151,6 +155,17 @@ public Action CCC_OnChatMessage(int client, int author, const char[] message)
|
|||||||
return Plugin_Continue;
|
return Plugin_Continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined _zr_included
|
||||||
|
public Action ZR_OnClientMotherZombieEligible(int client)
|
||||||
|
{
|
||||||
|
if (g_bWebclient[client] && g_bSkipInfection)
|
||||||
|
{
|
||||||
|
return Plugin_Handled;
|
||||||
|
}
|
||||||
|
return Plugin_Continue;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
public Action Timer_SendVoiceInit(Handle timer, int Serial)
|
public Action Timer_SendVoiceInit(Handle timer, int Serial)
|
||||||
{
|
{
|
||||||
int client;
|
int client;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user