1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-07-02 10:00:27 -05:00

Encounter: add better team randomization between games

This commit is contained in:
Jbleezy
2023-04-22 20:12:46 -07:00
parent 480bde9619
commit 11e33d7ec3
2 changed files with 49 additions and 31 deletions

View File

@ -58,31 +58,28 @@ menuautoassign( comingfrommenu )
{
if ( sessionmodeiszombiesgame() )
{
if (level.allow_teamchange)
if (assignment == "")
{
if (assignment == "")
guids = strTok(getDvar("team_axis"), " ");
foreach (guid in guids)
{
guids = strTok(getDvar("team_axis"), " ");
foreach (guid in guids)
if (self getguid() == int(guid))
{
if (self getguid() == int(guid))
{
assignment = "axis";
break;
}
assignment = "axis";
break;
}
}
}
if (assignment == "")
if (assignment == "")
{
guids = strTok(getDvar("team_allies"), " ");
foreach (guid in guids)
{
guids = strTok(getDvar("team_allies"), " ");
foreach (guid in guids)
if (self getguid() == int(guid))
{
if (self getguid() == int(guid))
{
assignment = "allies";
break;
}
assignment = "allies";
break;
}
}
}