moving fakes from team back to spec if too many
This commit is contained in:
@@ -537,6 +537,10 @@ public void CheckPopulation()
|
|||||||
{
|
{
|
||||||
SetFakeToTeam();
|
SetFakeToTeam();
|
||||||
}
|
}
|
||||||
|
else if (getFakesNeededInTeam() < fakes_in_team)
|
||||||
|
{
|
||||||
|
SetFakeToSpec();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool nightTime()
|
public bool nightTime()
|
||||||
@@ -573,6 +577,18 @@ public void SetFakeToTeam()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetFakeToSpec()
|
||||||
|
{
|
||||||
|
for(int i = 1; i <= MaxClients; i++)
|
||||||
|
{
|
||||||
|
if(IsClientConnected(i) && IsClientInGame(i) && IsFakeClient(i) && !IsClientSourceTV(i) && GetClientTeam(i) > CS_TEAM_SPECTATOR)
|
||||||
|
{
|
||||||
|
ChangeClientTeam(i, CS_TEAM_SPECTATOR);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void CreateFake()
|
public void CreateFake()
|
||||||
{
|
{
|
||||||
if (g_hNames.Length == 0 || g_hClanNames.Length == 0)
|
if (g_hNames.Length == 0 || g_hClanNames.Length == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user