From 44e43d9d240735695668849fbd7aaafd339f262d Mon Sep 17 00:00:00 2001 From: E. Allen Soard Date: Fri, 15 Apr 2011 06:17:26 -0700 Subject: Added MaxAgents configuration option to RegionConfig.ini allowing region hosters to setup regions maintaining more control over system resources. --- OpenSim/Framework/RegionInfo.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'OpenSim/Framework/RegionInfo.cs') diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index daf0a25..239ce3d 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -369,6 +369,7 @@ namespace OpenSim.Framework private int m_physPrimMax = 0; private bool m_clampPrimSize = false; private int m_objectCapacity = 0; + private int m_agentCapacity = 0; private string m_regionType = String.Empty; private RegionLightShareData m_windlight = new RegionLightShareData(); protected uint m_httpPort; @@ -547,6 +548,11 @@ namespace OpenSim.Framework get { return m_objectCapacity; } } + public int AgentCapacity + { + get { return m_agentCapacity; } + } + public byte AccessLevel { get { return (byte)Util.ConvertMaturityToAccessLevel((uint)RegionSettings.Maturity); } @@ -821,6 +827,8 @@ namespace OpenSim.Framework m_objectCapacity = config.GetInt("MaxPrims", 15000); + m_agentCapacity = config.GetInt("MaxAgents", 100); + // Multi-tenancy // @@ -857,6 +865,9 @@ namespace OpenSim.Framework if (m_objectCapacity != 0) config.Set("MaxPrims", m_objectCapacity); + if (m_agentCapacity != 0) + config.Set("MaxAgents", m_agentCapacity); + if (ScopeID != UUID.Zero) config.Set("ScopeID", ScopeID.ToString()); @@ -943,6 +954,9 @@ namespace OpenSim.Framework configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "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, "Scope ID for this region", ScopeID.ToString(), true); @@ -1055,6 +1069,9 @@ namespace OpenSim.Framework case "object_capacity": m_objectCapacity = (int)configuration_result; break; + case "agent_capacity": + m_agentCapacity = (int)configuration_result; + break; case "scope_id": ScopeID = (UUID)configuration_result; break; -- cgit v1.1