Revert "TeamManager: ClientInGame --> PostAdminCheck"
This reverts commit 448552c414
.
This commit is contained in:
parent
36bc91ef0b
commit
4bb399c18d
@ -17,14 +17,12 @@ bool g_bRoundEnded = false;
|
||||
bool g_bZombieSpawned = false;
|
||||
int g_TeamChangeQueue[MAXPLAYERS + 1] = { -1, ... };
|
||||
|
||||
int g_iClientsInGame;
|
||||
|
||||
public Plugin myinfo =
|
||||
{
|
||||
name = "TeamManager",
|
||||
author = "BotoX + Dogan",
|
||||
author = "BotoX",
|
||||
description = "",
|
||||
version = "2.0",
|
||||
version = "1.0",
|
||||
url = "https://github.com/CSSZombieEscape/sm-plugins/tree/master/TeamManager"
|
||||
};
|
||||
|
||||
@ -48,7 +46,6 @@ public void OnMapStart()
|
||||
{
|
||||
g_iWarmup = 0;
|
||||
g_iMaxWarmup = 0;
|
||||
g_iClientsInGame = 0;
|
||||
g_bWarmup = false;
|
||||
g_bRoundEnded = false;
|
||||
g_bZombieSpawned = false;
|
||||
@ -81,13 +78,14 @@ public Action OnWarmupTimer(Handle timer)
|
||||
if(g_CVar_sm_warmupratio.FloatValue > 0.0)
|
||||
{
|
||||
int ClientsConnected = GetClientCount(false);
|
||||
int ClientsInGame = GetClientCount(true);
|
||||
int ClientsNeeded = RoundToCeil(float(ClientsConnected) * g_CVar_sm_warmupratio.FloatValue);
|
||||
ClientsNeeded = ClientsNeeded > MIN_PLAYERS ? ClientsNeeded : MIN_PLAYERS;
|
||||
|
||||
if(g_iClientsInGame < ClientsNeeded)
|
||||
if(ClientsInGame < ClientsNeeded)
|
||||
{
|
||||
g_iMaxWarmup++;
|
||||
PrintCenterTextAll("Warmup: Waiting for %d more players to join or %d seconds.", ClientsNeeded - g_iClientsInGame, g_CVar_sm_warmupmaxtime.IntValue - g_iMaxWarmup);
|
||||
PrintCenterTextAll("Warmup: Waiting for %d more players to join or %d seconds.", ClientsNeeded - ClientsInGame, g_CVar_sm_warmupmaxtime.IntValue - g_iMaxWarmup);
|
||||
return Plugin_Continue;
|
||||
}
|
||||
else
|
||||
@ -106,14 +104,6 @@ public void OnClientDisconnect(int client)
|
||||
g_TeamChangeQueue[client] = -1;
|
||||
}
|
||||
|
||||
public void OnClientPostAdminCheck(int client)
|
||||
{
|
||||
if(IsFakeClient(client) || IsClientSourceTV(client) || !g_bWarmup)
|
||||
return;
|
||||
else
|
||||
g_iClientsInGame++;
|
||||
}
|
||||
|
||||
public Action OnJoinTeamCommand(int client, const char[] command, int argc)
|
||||
{
|
||||
if(client < 1 || client >= MaxClients || !IsClientInGame(client))
|
||||
|
Loading…
Reference in New Issue
Block a user