add 'lock teams' feature backend -- still needs UI
This commit is contained in:
@@ -53,6 +53,7 @@ namespace OpenRA.FileFormats
|
||||
public string[] Mods = { "ra" }; // mod names
|
||||
public int OrderLatency = 3;
|
||||
public int RandomSeed = 0;
|
||||
public bool LockTeams = false; // don't allow team changes after game start.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -116,6 +116,9 @@ namespace OpenRA.Widgets.Delegates
|
||||
|
||||
void CycleStance(Player p, ButtonWidget bw)
|
||||
{
|
||||
if (Game.LobbyInfo.GlobalSettings.LockTeams)
|
||||
return; // team changes are banned
|
||||
|
||||
var nextStance = GetNextStance((Stance)Enum.Parse(typeof(Stance), bw.Text));
|
||||
|
||||
Game.IssueOrder(new Order("SetStance", Game.world.LocalPlayer.PlayerActor,
|
||||
|
||||
Reference in New Issue
Block a user