mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-23 06:15:43 +00:00
Use callbacks for internal change team
This commit is contained in:
parent
ed53df987c
commit
d2d939ca70
@ -577,7 +577,12 @@ teamBots()
|
||||
if(player.pers["team"] == toTeam)
|
||||
continue;
|
||||
|
||||
player notify("menuresponse", game["menu_team"], toTeam);
|
||||
if (toTeam == "allies")
|
||||
self thread [[level.allies]]();
|
||||
else if (toTeam == "axis")
|
||||
self thread [[level.axis]]();
|
||||
else
|
||||
self thread [[level.spectator]]();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -600,7 +605,7 @@ teamBots()
|
||||
{
|
||||
if(axis > teamAmount)
|
||||
{
|
||||
player notify("menuresponse", game["menu_team"], "allies");
|
||||
self thread [[level.allies]]();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -608,12 +613,12 @@ teamBots()
|
||||
{
|
||||
if(axis < teamAmount)
|
||||
{
|
||||
player notify("menuresponse", game["menu_team"], "axis");
|
||||
self thread [[level.axis]]();
|
||||
break;
|
||||
}
|
||||
else if(player.pers["team"] != "allies")
|
||||
{
|
||||
player notify("menuresponse", game["menu_team"], "allies");
|
||||
self thread [[level.allies]]();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user