mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-23 13:40:22 -05:00
Encounter: add better team randomization between games
This commit is contained in:
@ -57,8 +57,6 @@ menuautoassign( comingfrommenu )
|
||||
if ( assignment == "" || getdvarint( "party_autoteams" ) == 0 )
|
||||
{
|
||||
if ( sessionmodeiszombiesgame() )
|
||||
{
|
||||
if (level.allow_teamchange)
|
||||
{
|
||||
if (assignment == "")
|
||||
{
|
||||
@ -85,7 +83,6 @@ menuautoassign( comingfrommenu )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (assignment == "")
|
||||
{
|
||||
|
@ -1144,6 +1144,9 @@ round_start_wait(time, initial)
|
||||
level thread freeze_hotjoin_players();
|
||||
|
||||
flag_wait("initial_blackscreen_passed");
|
||||
|
||||
setDvar("team_axis", "");
|
||||
setDvar("team_allies", "");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2552,23 +2555,41 @@ save_teams_on_intermission()
|
||||
{
|
||||
level waittill("intermission");
|
||||
|
||||
text = "";
|
||||
axis_guids = "";
|
||||
allies_guids = "";
|
||||
|
||||
if (level.allow_teamchange)
|
||||
{
|
||||
players = get_players("axis");
|
||||
foreach (player in players)
|
||||
{
|
||||
text += player getguid() + " ";
|
||||
axis_guids += player getguid() + " ";
|
||||
}
|
||||
|
||||
setDvar("team_axis", text);
|
||||
|
||||
text = "";
|
||||
players = get_players("allies");
|
||||
foreach (player in players)
|
||||
{
|
||||
text += player getguid() + " ";
|
||||
allies_guids += player getguid() + " ";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
players = array_randomize(get_players());
|
||||
for (i = 0; i < players.size; i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
axis_guids += player getguid() + " ";
|
||||
}
|
||||
else
|
||||
{
|
||||
allies_guids += player getguid() + " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setDvar("team_allies", text);
|
||||
setDvar("team_axis", axis_guids);
|
||||
setDvar("team_allies", allies_guids);
|
||||
}
|
||||
|
||||
all_voice_on_intermission()
|
||||
|
Reference in New Issue
Block a user