diff options
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 18 |
2 files changed, 29 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ff3d3af..c2c0b96 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -123,6 +123,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
123 | /// </summary> | 123 | /// </summary> |
124 | public float m_maxPhys = 10; | 124 | public float m_maxPhys = 10; |
125 | 125 | ||
126 | /// <summary> | ||
127 | /// Max prims an object will hold | ||
128 | /// </summary> | ||
129 | public int m_linksetCapacity = 0; | ||
130 | |||
126 | public bool m_clampPrimSize; | 131 | public bool m_clampPrimSize; |
127 | public bool m_trustBinaries; | 132 | public bool m_trustBinaries; |
128 | public bool m_allowScriptCrossings; | 133 | public bool m_allowScriptCrossings; |
@@ -772,6 +777,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
772 | m_clampPrimSize = true; | 777 | m_clampPrimSize = true; |
773 | } | 778 | } |
774 | 779 | ||
780 | m_linksetCapacity = startupConfig.GetInt("LinksetPrims", m_linksetCapacity); | ||
781 | if (RegionInfo.LinksetCapacity > 0) | ||
782 | { | ||
783 | m_linksetCapacity = RegionInfo.LinksetCapacity; | ||
784 | } | ||
785 | |||
775 | m_useTrashOnDelete = startupConfig.GetBoolean("UseTrashOnDelete", m_useTrashOnDelete); | 786 | m_useTrashOnDelete = startupConfig.GetBoolean("UseTrashOnDelete", m_useTrashOnDelete); |
776 | m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries); | 787 | m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries); |
777 | m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings); | 788 | m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index b4a155e..e528288 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2014,6 +2014,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
2014 | if (objectGroup == this) | 2014 | if (objectGroup == this) |
2015 | return; | 2015 | return; |
2016 | 2016 | ||
2017 | // If the configured linkset capacity is greater than zero, | ||
2018 | // and the new linkset would have a prim count higher than this | ||
2019 | // value, do not link it. | ||
2020 | if (m_scene.m_linksetCapacity > 0 && | ||
2021 | (PrimCount + objectGroup.PrimCount) > | ||
2022 | m_scene.m_linksetCapacity) | ||
2023 | { | ||
2024 | m_log.DebugFormat( | ||
2025 | "[SCENE OBJECT GROUP]: Cannot link group with root" + | ||
2026 | " part {0}, {1} ({2} prims) to group with root part" + | ||
2027 | " {3}, {4} ({5} prims) because the new linkset" + | ||
2028 | " would exceed the configured maximum of {6}", | ||
2029 | objectGroup.RootPart.Name, objectGroup.RootPart.UUID, | ||
2030 | objectGroup.PrimCount, RootPart.Name, RootPart.UUID, | ||
2031 | PrimCount, m_scene.m_linksetCapacity); | ||
2032 | return; | ||
2033 | } | ||
2034 | |||
2017 | // 'linkPart' == the root of the group being linked into this group | 2035 | // 'linkPart' == the root of the group being linked into this group |
2018 | SceneObjectPart linkPart = objectGroup.m_rootPart; | 2036 | SceneObjectPart linkPart = objectGroup.m_rootPart; |
2019 | 2037 | ||