Added MaxAgents configuration option to RegionConfig.ini allowing region hosters to setup regions maintaining more control over system resources.
parent
d5256094d9
commit
44e43d9d24
|
@ -369,6 +369,7 @@ namespace OpenSim.Framework
|
||||||
private int m_physPrimMax = 0;
|
private int m_physPrimMax = 0;
|
||||||
private bool m_clampPrimSize = false;
|
private bool m_clampPrimSize = false;
|
||||||
private int m_objectCapacity = 0;
|
private int m_objectCapacity = 0;
|
||||||
|
private int m_agentCapacity = 0;
|
||||||
private string m_regionType = String.Empty;
|
private string m_regionType = String.Empty;
|
||||||
private RegionLightShareData m_windlight = new RegionLightShareData();
|
private RegionLightShareData m_windlight = new RegionLightShareData();
|
||||||
protected uint m_httpPort;
|
protected uint m_httpPort;
|
||||||
|
@ -547,6 +548,11 @@ namespace OpenSim.Framework
|
||||||
get { return m_objectCapacity; }
|
get { return m_objectCapacity; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int AgentCapacity
|
||||||
|
{
|
||||||
|
get { return m_agentCapacity; }
|
||||||
|
}
|
||||||
|
|
||||||
public byte AccessLevel
|
public byte AccessLevel
|
||||||
{
|
{
|
||||||
get { return (byte)Util.ConvertMaturityToAccessLevel((uint)RegionSettings.Maturity); }
|
get { return (byte)Util.ConvertMaturityToAccessLevel((uint)RegionSettings.Maturity); }
|
||||||
|
@ -821,6 +827,8 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
m_objectCapacity = config.GetInt("MaxPrims", 15000);
|
m_objectCapacity = config.GetInt("MaxPrims", 15000);
|
||||||
|
|
||||||
|
m_agentCapacity = config.GetInt("MaxAgents", 100);
|
||||||
|
|
||||||
|
|
||||||
// Multi-tenancy
|
// Multi-tenancy
|
||||||
//
|
//
|
||||||
|
@ -857,6 +865,9 @@ namespace OpenSim.Framework
|
||||||
if (m_objectCapacity != 0)
|
if (m_objectCapacity != 0)
|
||||||
config.Set("MaxPrims", m_objectCapacity);
|
config.Set("MaxPrims", m_objectCapacity);
|
||||||
|
|
||||||
|
if (m_agentCapacity != 0)
|
||||||
|
config.Set("MaxAgents", m_agentCapacity);
|
||||||
|
|
||||||
if (ScopeID != UUID.Zero)
|
if (ScopeID != UUID.Zero)
|
||||||
config.Set("ScopeID", ScopeID.ToString());
|
config.Set("ScopeID", ScopeID.ToString());
|
||||||
|
|
||||||
|
@ -943,6 +954,9 @@ namespace OpenSim.Framework
|
||||||
configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
|
configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
|
||||||
"Max objects this sim will hold", m_objectCapacity.ToString(), true);
|
"Max objects this sim will hold", m_objectCapacity.ToString(), true);
|
||||||
|
|
||||||
|
configMember.addConfigurationOption("agent_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
|
||||||
|
"Max avatars this sim will hold", m_agentCapacity.ToString(), true);
|
||||||
|
|
||||||
configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
|
configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
|
||||||
"Scope ID for this region", ScopeID.ToString(), true);
|
"Scope ID for this region", ScopeID.ToString(), true);
|
||||||
|
|
||||||
|
@ -1055,6 +1069,9 @@ namespace OpenSim.Framework
|
||||||
case "object_capacity":
|
case "object_capacity":
|
||||||
m_objectCapacity = (int)configuration_result;
|
m_objectCapacity = (int)configuration_result;
|
||||||
break;
|
break;
|
||||||
|
case "agent_capacity":
|
||||||
|
m_agentCapacity = (int)configuration_result;
|
||||||
|
break;
|
||||||
case "scope_id":
|
case "scope_id":
|
||||||
ScopeID = (UUID)configuration_result;
|
ScopeID = (UUID)configuration_result;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -125,7 +125,10 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
else
|
else
|
||||||
Scene.RegionInfo.RegionSettings.AllowLandResell = true;
|
Scene.RegionInfo.RegionSettings.AllowLandResell = true;
|
||||||
|
|
||||||
|
if((byte)maxAgents <= Scene.RegionInfo.AgentCapacity)
|
||||||
Scene.RegionInfo.RegionSettings.AgentLimit = (byte) maxAgents;
|
Scene.RegionInfo.RegionSettings.AgentLimit = (byte) maxAgents;
|
||||||
|
else
|
||||||
|
Scene.RegionInfo.RegionSettings.AgentLimit = Scene.RegionInfo.AgentCapacity;
|
||||||
|
|
||||||
Scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor;
|
Scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor;
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ ExternalHostName = "SYSTEMIP"
|
||||||
; PhysicalPrimMax = 10
|
; PhysicalPrimMax = 10
|
||||||
; ClampPrimSize = False
|
; ClampPrimSize = False
|
||||||
; MaxPrims = 15000
|
; MaxPrims = 15000
|
||||||
|
; MaxAgents = 100
|
||||||
|
|
||||||
; *
|
; *
|
||||||
; * Multi-Tenancy. Only set if needed
|
; * Multi-Tenancy. Only set if needed
|
||||||
|
|
Loading…
Reference in New Issue