fix broken team balance
This commit is contained in:
parent
bc781cfd76
commit
f25084c9e3
27
data/cdata/scripts/mp/team_balance.gsc
Normal file
27
data/cdata/scripts/mp/team_balance.gsc
Normal file
@ -0,0 +1,27 @@
|
||||
init()
|
||||
{
|
||||
// define the auto balance string in the game array (referenced in gsc dump, but not defined past IW6?)
|
||||
precachestring(&"MP_AUTOBALANCE_NOW");
|
||||
game["strings"]["autobalance"] = &"MP_AUTOBALANCE_NOW";
|
||||
|
||||
// define onteamselection callback function used in balanceteams()
|
||||
level.onteamselection = ::set_team;
|
||||
}
|
||||
|
||||
set_team(team)
|
||||
{
|
||||
if (team != self.pers["team"])
|
||||
{
|
||||
self.switching_teams = true;
|
||||
self.joining_team = team;
|
||||
self.leaving_team = self.pers["team"];
|
||||
}
|
||||
|
||||
if (self.sessionstate == "playing")
|
||||
{
|
||||
self suicide();
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_menus::addtoteam(team);
|
||||
maps\mp\gametypes\_menus::endrespawnnotify();
|
||||
}
|
Loading…
Reference in New Issue
Block a user