From 750e203c221659e37fff79e0933aca612b39a5b5 Mon Sep 17 00:00:00 2001 From: BotoX Date: Wed, 19 Apr 2017 19:59:59 +0200 Subject: [PATCH] TeamManager: small fix --- TeamManager/scripting/TeamManager.sp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/TeamManager/scripting/TeamManager.sp b/TeamManager/scripting/TeamManager.sp index b8b5e9f0..ed031eae 100644 --- a/TeamManager/scripting/TeamManager.sp +++ b/TeamManager/scripting/TeamManager.sp @@ -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; }