diff --git a/OpenRA.FileFormats/Session.cs b/OpenRA.FileFormats/Session.cs index 3536732637..c07eaf3dd5 100644 --- a/OpenRA.FileFormats/Session.cs +++ b/OpenRA.FileFormats/Session.cs @@ -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. } } diff --git a/OpenRA.Game/Widgets/Delegates/DiplomacyDelegate.cs b/OpenRA.Game/Widgets/Delegates/DiplomacyDelegate.cs index c32fe8154e..1f633e9582 100644 --- a/OpenRA.Game/Widgets/Delegates/DiplomacyDelegate.cs +++ b/OpenRA.Game/Widgets/Delegates/DiplomacyDelegate.cs @@ -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,