add 'lock teams' feature backend -- still needs UI

This commit is contained in:
Chris Forbes
2010-07-10 15:07:29 +12:00
parent 77405a7700
commit 8d68bd026d
2 changed files with 4 additions and 0 deletions

View File

@@ -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.
}
}

View File

@@ -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,