TeamManager: small fix
This commit is contained in:
parent
77c983d265
commit
750e203c22
@ -33,13 +33,6 @@ public void OnPluginStart()
|
||||
g_CVar_sm_warmuptime = CreateConVar("sm_warmuptime", "10", "Warmup timer.", 0, true, 0.0, true, 60.0);
|
||||
g_CVar_sm_warmupratio = CreateConVar("sm_warmupratio", "0.60", "Ratio of connected players that need to be in game to start warmup timer.", 0, true, 0.0, true, 1.0);
|
||||
|
||||
/* Late load */
|
||||
for(int client = 1; client <= MaxClients; client++)
|
||||
{
|
||||
if(!IsClientInGame(client))
|
||||
continue;
|
||||
}
|
||||
|
||||
AutoExecConfig(true, "plugin.TeamManager");
|
||||
}
|
||||
|
||||
@ -85,7 +78,7 @@ public Action OnWarmupTimer(Handle timer)
|
||||
return Plugin_Continue;
|
||||
}
|
||||
|
||||
public void OnClientConnected(int client)
|
||||
public void OnClientDisconnect(int client)
|
||||
{
|
||||
g_TeamChangeQueue[client] = -1;
|
||||
}
|
||||
@ -129,7 +122,7 @@ public Action OnJoinTeamCommand(int client, const char[] command, int argc)
|
||||
if(NewTeam == CS_TEAM_T || NewTeam == CS_TEAM_NONE)
|
||||
NewTeam = CS_TEAM_CT;
|
||||
}
|
||||
else if(NewTeam == CS_TEAM_NONE)
|
||||
else if(NewTeam == CS_TEAM_CT || NewTeam == CS_TEAM_NONE)
|
||||
NewTeam = CS_TEAM_T;
|
||||
|
||||
if(NewTeam == CurrentTeam)
|
||||
@ -192,8 +185,7 @@ public Action ZR_OnClientInfect(int &client, int &attacker, bool &motherInfect,
|
||||
if(g_bWarmup)
|
||||
return Plugin_Handled;
|
||||
|
||||
if(motherInfect)
|
||||
g_bZombieSpawned = true;
|
||||
g_bZombieSpawned = true;
|
||||
|
||||
return Plugin_Continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user