just some minor adjustments to placing fakes on teams
This commit is contained in:
parent
fca3e99528
commit
72bd0c3ce5
@ -515,34 +515,36 @@ public void CheckPopulation()
|
||||
}
|
||||
else if (iPlayers < 6)
|
||||
{
|
||||
max = iPlayers * 5;
|
||||
max = iPlayers * 3;
|
||||
min = iPlayers * 2;
|
||||
}
|
||||
else if (iPlayers < 11)
|
||||
{
|
||||
max = RoundToFloor(iPlayers * 1.5);
|
||||
max = iPlayers;
|
||||
min = iPlayers;
|
||||
}
|
||||
else if (iPlayers < 20)
|
||||
{
|
||||
max = iPlayers;
|
||||
max = RoundToFloor(iPlayers * 0.5);
|
||||
min = RoundToFloor(iPlayers * 0.5);
|
||||
}
|
||||
else if (iPlayers < 26)
|
||||
{
|
||||
max = iPlayers;
|
||||
max = RoundToFloor(iPlayers * 0.5);
|
||||
min = RoundToFloor(iPlayers * 0.3);
|
||||
}
|
||||
else if (iPlayers < 36)
|
||||
{
|
||||
max = RoundToFloor(iPlayers * 0.5);
|
||||
min = RoundToFloor(iPlayers * 0.3);
|
||||
max = RoundToFloor(iPlayers * 0.3);
|
||||
min = RoundToFloor(iPlayers * 0.1);
|
||||
}
|
||||
else
|
||||
{
|
||||
max = RoundToFloor(iPlayers * 0.3);
|
||||
min = RoundToFloor(iPlayers * 0.1);
|
||||
}
|
||||
max += 3;
|
||||
min += 2;
|
||||
|
||||
iFakesNeeded = GetRandomInt(min, max);
|
||||
//iFakesNeeded = randomAmount - iPlayers;
|
||||
@ -553,7 +555,7 @@ public void CheckPopulation()
|
||||
}
|
||||
else
|
||||
{
|
||||
iFakesInTeamNeeded = iFakesNeeded / 3;
|
||||
iFakesInTeamNeeded = (iFakesNeeded / 4);
|
||||
}
|
||||
if (iFakesInTeamNeeded < 0)
|
||||
{
|
||||
@ -640,34 +642,34 @@ public void CheckPopulation()
|
||||
iFakesInTeam++;
|
||||
}
|
||||
|
||||
if (iFakes == iFakesNeeded && iFakesInTeam != iFakesInTeamNeeded && g_iAdminFakes == -1)
|
||||
if (iFakesInTeam != iFakesInTeamNeeded && g_iAdminFakes == -1)
|
||||
{
|
||||
while (iFakesInTeam < iFakesInTeamNeeded)
|
||||
{
|
||||
for(int i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if(g_bFakePopulation[i] && GetClientTeam(i) <= CS_TEAM_SPECTATOR)
|
||||
{
|
||||
ChangeClientTeam(i, CS_TEAM_CT);
|
||||
FakeClientCommandEx(i, "joinclass");
|
||||
iFakesInTeam++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (iFakesInTeam < iFakesInTeamNeeded)
|
||||
{
|
||||
for(int i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if(g_bFakePopulation[i] && GetClientTeam(i) <= CS_TEAM_SPECTATOR)
|
||||
{
|
||||
ChangeClientTeam(i, CS_TEAM_CT);
|
||||
FakeClientCommandEx(i, "joinclass");
|
||||
iFakesInTeam++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while (iFakesInTeam > iFakesInTeamNeeded)
|
||||
{
|
||||
for(int i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if(g_bFakePopulation[i] && GetClientTeam(i) >= CS_TEAM_T)
|
||||
{
|
||||
ChangeClientTeam(i, CS_TEAM_SPECTATOR);
|
||||
iFakesInTeam--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (iFakesInTeam > iFakesInTeamNeeded)
|
||||
{
|
||||
for(int i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if(g_bFakePopulation[i] && GetClientTeam(i) >= CS_TEAM_T)
|
||||
{
|
||||
ChangeClientTeam(i, CS_TEAM_SPECTATOR);
|
||||
iFakesInTeam--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user