diff --git a/OpenRA.Game/GameRules/Settings.cs b/OpenRA.Game/GameRules/Settings.cs index aa2e97cec1..448220c73f 100644 --- a/OpenRA.Game/GameRules/Settings.cs +++ b/OpenRA.Game/GameRules/Settings.cs @@ -36,6 +36,7 @@ namespace OpenRA.GameRules public int TimeOut = 0; public bool Dedicated = false; public bool DedicatedLoop = true; + public bool LockBots = false; public ServerSettings() { } @@ -53,6 +54,7 @@ namespace OpenRA.GameRules TimeOut = other.TimeOut; Dedicated = other.Dedicated; DedicatedLoop = other.DedicatedLoop; + LockBots = other.LockBots; } } diff --git a/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs b/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs index 11dcbe635a..fa94b7977d 100644 --- a/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs +++ b/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs @@ -546,6 +546,8 @@ namespace OpenRA.Mods.RA.Server static Session.Slot MakeSlotFromPlayerReference(PlayerReference pr) { if (!pr.Playable) return null; + if (Game.Settings.Server.LockBots || Game.Settings.Server.Dedicated) + pr.AllowBots = false; return new Session.Slot { PlayerReference = pr.Name,