added auto slay if last humans are bots
This commit is contained in:
parent
17a9c52b20
commit
dbfeca91e6
@ -413,9 +413,14 @@ public bool is_bot_player(int client)
|
|||||||
|
|
||||||
public Action recursive_pressing(Handle timer, any data)
|
public Action recursive_pressing(Handle timer, any data)
|
||||||
{
|
{
|
||||||
|
bool found_valid_ct = false;
|
||||||
for (int client = 1; client <= MaxClients; client++)
|
for (int client = 1; client <= MaxClients; client++)
|
||||||
{
|
{
|
||||||
if (!IsValidClient(client)) continue;
|
if (!IsValidClient(client)) continue;
|
||||||
|
if (!is_bot_player(client) && GetClientTeam(client) == 3)
|
||||||
|
{
|
||||||
|
found_valid_ct = true;
|
||||||
|
}
|
||||||
if (is_bot_player(client))
|
if (is_bot_player(client))
|
||||||
{
|
{
|
||||||
if (GetClientTeam(client) == 1 || GetClientTeam(client) == 0)
|
if (GetClientTeam(client) == 1 || GetClientTeam(client) == 0)
|
||||||
@ -517,6 +522,17 @@ public Action recursive_pressing(Handle timer, any data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!found_valid_ct)
|
||||||
|
{
|
||||||
|
for (int client = 1; client <= MaxClients; client++)
|
||||||
|
{
|
||||||
|
if (!IsValidClient(client)) continue;
|
||||||
|
if (is_bot_player(client) && GetClientTeam(client) == 3)
|
||||||
|
{
|
||||||
|
ForcePlayerSuicide(client);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return Plugin_Continue;
|
return Plugin_Continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user