Skip to content

Instantly share code, notes, and snippets.

@justincc
Created March 5, 2015 19:27
Show Gist options
  • Save justincc/a6c48194eac4d41b6c34 to your computer and use it in GitHub Desktop.
Save justincc/a6c48194eac4d41b6c34 to your computer and use it in GitHub Desktop.
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 4169152..eb56d8d 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -747,6 +747,15 @@ namespace OpenSim.Framework
AgentCapacity = config.GetInt("MaxAgents", 100);
allKeys.Remove("MaxAgents");
+ if (config.Contains("AgentLimit"))
+ {
+ int agentLimit = config.GetInt("AgentLimit");
+ agentLimit = Math.Max(agentLimit, 0);
+ agentLimit = Math.Min(agentLimit, AgentCapacity);
+ RegionSettings.AgentLimit = agentLimit;
+ allKeys.Remove("AgentLimit");
+ }
+
// Multi-tenancy
//
ScopeID = new UUID(config.GetString("ScopeID", UUID.Zero.ToString()));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment