option to disable bots on server + disable bots on any dedicated server due to #2540
This commit is contained in:
@@ -36,6 +36,7 @@ namespace OpenRA.GameRules
|
|||||||
public int TimeOut = 0;
|
public int TimeOut = 0;
|
||||||
public bool Dedicated = false;
|
public bool Dedicated = false;
|
||||||
public bool DedicatedLoop = true;
|
public bool DedicatedLoop = true;
|
||||||
|
public bool LockBots = false;
|
||||||
|
|
||||||
public ServerSettings() { }
|
public ServerSettings() { }
|
||||||
|
|
||||||
@@ -53,6 +54,7 @@ namespace OpenRA.GameRules
|
|||||||
TimeOut = other.TimeOut;
|
TimeOut = other.TimeOut;
|
||||||
Dedicated = other.Dedicated;
|
Dedicated = other.Dedicated;
|
||||||
DedicatedLoop = other.DedicatedLoop;
|
DedicatedLoop = other.DedicatedLoop;
|
||||||
|
LockBots = other.LockBots;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -546,6 +546,8 @@ namespace OpenRA.Mods.RA.Server
|
|||||||
static Session.Slot MakeSlotFromPlayerReference(PlayerReference pr)
|
static Session.Slot MakeSlotFromPlayerReference(PlayerReference pr)
|
||||||
{
|
{
|
||||||
if (!pr.Playable) return null;
|
if (!pr.Playable) return null;
|
||||||
|
if (Game.Settings.Server.LockBots || Game.Settings.Server.Dedicated)
|
||||||
|
pr.AllowBots = false;
|
||||||
return new Session.Slot
|
return new Session.Slot
|
||||||
{
|
{
|
||||||
PlayerReference = pr.Name,
|
PlayerReference = pr.Name,
|
||||||
|
|||||||
Reference in New Issue
Block a user