Revert "General: Allow auto infection on 'late' spawners."

This reverts commit a45be16399.
This commit is contained in:
2018-08-28 13:22:54 +02:00
parent a45be16399
commit 252392c433
2 changed files with 7 additions and 30 deletions

View File

@ -275,35 +275,14 @@ InfectOnClientTeam(client, team)
*/
InfectOnClientSpawn(client)
{
// If the zombie has spawned.
if (InfectHasZombieSpawned())
// Disable zombie flag on client.
g_bZombie[client] = false;
// Check if client is spawning on the terrorist team.
if (ZRIsClientOnTeam(client, CS_TEAM_T) && InfectHasZombieSpawned())
{
// Check if late spawn protection is enabled.
new bool:latespawn = GetConVarBool(g_hCvarsList[CVAR_INFECT_LATE_SPAWN]);
if (latespawn)
{
// Enable zombie flag on client.
g_bZombie[client] = true;
// Swap the client to terrorists.
if (ZRIsClientOnTeam(client, CS_TEAM_CT))
{
CS_SwitchTeam(client, CS_TEAM_T);
CS_RespawnPlayer(client);
}
}
else
{
// Disable zombie flag on client.
g_bZombie[client] = false;
// Swap the client to counter-terrorists.
if (ZRIsClientOnTeam(client, CS_TEAM_T))
{
CS_SwitchTeam(client, CS_TEAM_CT);
CS_RespawnPlayer(client);
}
}
CS_SwitchTeam(client, CS_TEAM_CT);
CS_RespawnPlayer(client);
}
InfectUnglitchKevlar(client);