aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/RegionInfo.cs17
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs5
2 files changed, 21 insertions, 1 deletions
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
369 private int m_physPrimMax = 0; 369 private int m_physPrimMax = 0;
370 private bool m_clampPrimSize = false; 370 private bool m_clampPrimSize = false;
371 private int m_objectCapacity = 0; 371 private int m_objectCapacity = 0;
372 private int m_agentCapacity = 0;
372 private string m_regionType = String.Empty; 373 private string m_regionType = String.Empty;
373 private RegionLightShareData m_windlight = new RegionLightShareData(); 374 private RegionLightShareData m_windlight = new RegionLightShareData();
374 protected uint m_httpPort; 375 protected uint m_httpPort;
@@ -547,6 +548,11 @@ namespace OpenSim.Framework
547 get { return m_objectCapacity; } 548 get { return m_objectCapacity; }
548 } 549 }
549 550
551 public int AgentCapacity
552 {
553 get { return m_agentCapacity; }
554 }
555
550 public byte AccessLevel 556 public byte AccessLevel
551 { 557 {
552 get { return (byte)Util.ConvertMaturityToAccessLevel((uint)RegionSettings.Maturity); } 558 get { return (byte)Util.ConvertMaturityToAccessLevel((uint)RegionSettings.Maturity); }
@@ -821,6 +827,8 @@ namespace OpenSim.Framework
821 827
822 m_objectCapacity = config.GetInt("MaxPrims", 15000); 828 m_objectCapacity = config.GetInt("MaxPrims", 15000);
823 829
830 m_agentCapacity = config.GetInt("MaxAgents", 100);
831
824 832
825 // Multi-tenancy 833 // Multi-tenancy
826 // 834 //
@@ -857,6 +865,9 @@ namespace OpenSim.Framework
857 if (m_objectCapacity != 0) 865 if (m_objectCapacity != 0)
858 config.Set("MaxPrims", m_objectCapacity); 866 config.Set("MaxPrims", m_objectCapacity);
859 867
868 if (m_agentCapacity != 0)
869 config.Set("MaxAgents", m_agentCapacity);
870
860 if (ScopeID != UUID.Zero) 871 if (ScopeID != UUID.Zero)
861 config.Set("ScopeID", ScopeID.ToString()); 872 config.Set("ScopeID", ScopeID.ToString());
862 873
@@ -943,6 +954,9 @@ namespace OpenSim.Framework
943 configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, 954 configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
944 "Max objects this sim will hold", m_objectCapacity.ToString(), true); 955 "Max objects this sim will hold", m_objectCapacity.ToString(), true);
945 956
957 configMember.addConfigurationOption("agent_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
958 "Max avatars this sim will hold", m_agentCapacity.ToString(), true);
959
946 configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID, 960 configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
947 "Scope ID for this region", ScopeID.ToString(), true); 961 "Scope ID for this region", ScopeID.ToString(), true);
948 962
@@ -1055,6 +1069,9 @@ namespace OpenSim.Framework
1055 case "object_capacity": 1069 case "object_capacity":
1056 m_objectCapacity = (int)configuration_result; 1070 m_objectCapacity = (int)configuration_result;
1057 break; 1071 break;
1072 case "agent_capacity":
1073 m_agentCapacity = (int)configuration_result;
1074 break;
1058 case "scope_id": 1075 case "scope_id":
1059 ScopeID = (UUID)configuration_result; 1076 ScopeID = (UUID)configuration_result;
1060 break; 1077 break;
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index ab90e90..3aed6ba 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -125,7 +125,10 @@ namespace OpenSim.Region.CoreModules.World.Estate
125 else 125 else
126 Scene.RegionInfo.RegionSettings.AllowLandResell = true; 126 Scene.RegionInfo.RegionSettings.AllowLandResell = true;
127 127
128 Scene.RegionInfo.RegionSettings.AgentLimit = (byte) maxAgents; 128 if((byte)maxAgents <= Scene.RegionInfo.AgentCapacity)
129 Scene.RegionInfo.RegionSettings.AgentLimit = (byte) maxAgents;
130 else
131 Scene.RegionInfo.RegionSettings.AgentLimit = Scene.RegionInfo.AgentCapacity;
129 132
130 Scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor; 133 Scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor;
131 134