});
if (lowestplayer != NULL)
{
+ bool savedautobalance = surv_autobalance;
surv_autobalance = false;
SetPlayerTeamSimple(lowestplayer, surv_defenderteam);
- surv_autobalance = true;
+ surv_autobalance = savedautobalance;
return true;
}
FOREACH_CLIENT(true,
});
if (lowestplayer != NULL)
{
+ bool savedautobalance = surv_autobalance;
surv_autobalance = false;
SetPlayerTeamSimple(lowestplayer, surv_defenderteam);
- surv_autobalance = true;
+ surv_autobalance = savedautobalance;
}
return true;
}
{
player.surv_savedplayerstate = Surv_SavePlayerState(bot);
}
+ bool savedautobalance = surv_autobalance;
surv_autobalance = false;
surv_announcefrags = false;
SetPlayerTeamSimple(bot, surv_attackerteam);
- surv_autobalance = true;
+ surv_autobalance = savedautobalance;
surv_announcefrags = true;
LOG_TRACE("Removed bot");
}
});
if (lowestplayer != NULL)
{
+ bool savedautobalance = surv_autobalance;
surv_autobalance = false;
SetPlayerTeamSimple(lowestplayer, surv_attackerteam);
- surv_autobalance = true;
+ surv_autobalance = savedautobalance;
return true;
}
FOREACH_CLIENT(true,
});
if (lowestplayer != NULL)
{
+ bool savedautobalance = surv_autobalance;
surv_autobalance = false;
SetPlayerTeamSimple(lowestplayer, surv_attackerteam);
- surv_autobalance = true;
+ surv_autobalance = savedautobalance;
}
return true;
}
});
if (lowestplayer != NULL)
{
+ bool savedautobalance = surv_autobalance;
surv_autobalance = false;
SetPlayerTeamSimple(lowestplayer, surv_attackerteam);
- surv_autobalance = true;
+ surv_autobalance = savedautobalance;
return;
}
FOREACH_CLIENT(true,
{
return;
}
+ bool savedautobalance = surv_autobalance;
surv_autobalance = false;
SetPlayerTeamSimple(lowestplayer, surv_attackerteam);
- surv_autobalance = true;
+ surv_autobalance = savedautobalance;
return;
}
case surv_defenderteam:
{
it.surv_savedplayerstate = Surv_SavePlayerState(player);
}
+ bool savedautobalance = surv_autobalance;
surv_autobalance = false;
surv_announcefrags = false;
SetPlayerTeamSimple(it, surv_defenderteam);
- surv_autobalance = true;
+ surv_autobalance = savedautobalance;
surv_announcefrags = true;
return;
}
});
if (lowestplayer != NULL)
{
+ bool savedautobalance = surv_autobalance;
surv_autobalance = false;
surv_announcefrags = false;
SetPlayerTeamSimple(lowestplayer, surv_defenderteam);
- surv_autobalance = true;
+ surv_autobalance = savedautobalance;
surv_announcefrags = true;
return;
}
{
return;
}
+ bool savedautobalance = surv_autobalance;
surv_autobalance = false;
surv_announcefrags = false;
SetPlayerTeamSimple(lowestplayer, surv_defenderteam);
- surv_autobalance = true;
+ surv_autobalance = savedautobalance;
surv_announcefrags = true;
return;
}
{
entity player = M_ARGV(2, entity);
LOG_TRACE("Survival: CheckAllowedTeams, player = ", player.netname);
+ if (player == NULL)
+ {
+ return SURVIVAL_TEAM_BITS;
+ }
if (IS_BOT_CLIENT(player))
{
int teambits = surv_attackerteambit;