diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 21 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 18 |
2 files changed, 39 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d94d5ef..3af1060 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; |
@@ -789,6 +794,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
789 | m_maxPhys = RegionInfo.PhysPrimMax; | 794 | m_maxPhys = RegionInfo.PhysPrimMax; |
790 | } | 795 | } |
791 | 796 | ||
797 | m_linksetCapacity = startupConfig.GetInt("LinksetPrims", m_linksetCapacity); | ||
798 | if (RegionInfo.LinksetCapacity > 0) | ||
799 | { | ||
800 | m_linksetCapacity = RegionInfo.LinksetCapacity; | ||
801 | } | ||
802 | |||
792 | SpawnPointRouting = startupConfig.GetString("SpawnPointRouting", "closest"); | 803 | SpawnPointRouting = startupConfig.GetString("SpawnPointRouting", "closest"); |
793 | TelehubAllowLandmarks = startupConfig.GetBoolean("TelehubAllowLandmark", false); | 804 | TelehubAllowLandmarks = startupConfig.GetBoolean("TelehubAllowLandmark", false); |
794 | 805 | ||
@@ -4563,6 +4574,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
4563 | return LandChannel.GetLandObject(x, y).LandData; | 4574 | return LandChannel.GetLandObject(x, y).LandData; |
4564 | } | 4575 | } |
4565 | 4576 | ||
4577 | /// <summary> | ||
4578 | /// Get LandData by position. | ||
4579 | /// </summary> | ||
4580 | /// <param name="pos"></param> | ||
4581 | /// <returns></returns> | ||
4582 | public LandData GetLandData(Vector3 pos) | ||
4583 | { | ||
4584 | return GetLandData(pos.X, pos.Y); | ||
4585 | } | ||
4586 | |||
4566 | public LandData GetLandData(uint x, uint y) | 4587 | public LandData GetLandData(uint x, uint y) |
4567 | { | 4588 | { |
4568 | m_log.DebugFormat("[SCENE]: returning land for {0},{1}", x, y); | 4589 | m_log.DebugFormat("[SCENE]: returning land for {0},{1}", x, y); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 0448c25..38dbaa9 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2738,6 +2738,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
2738 | if (objectGroup == this) | 2738 | if (objectGroup == this) |
2739 | return; | 2739 | return; |
2740 | 2740 | ||
2741 | // If the configured linkset capacity is greater than zero, | ||
2742 | // and the new linkset would have a prim count higher than this | ||
2743 | // value, do not link it. | ||
2744 | if (m_scene.m_linksetCapacity > 0 && | ||
2745 | (PrimCount + objectGroup.PrimCount) > | ||
2746 | m_scene.m_linksetCapacity) | ||
2747 | { | ||
2748 | m_log.DebugFormat( | ||
2749 | "[SCENE OBJECT GROUP]: Cannot link group with root" + | ||
2750 | " part {0}, {1} ({2} prims) to group with root part" + | ||
2751 | " {3}, {4} ({5} prims) because the new linkset" + | ||
2752 | " would exceed the configured maximum of {6}", | ||
2753 | objectGroup.RootPart.Name, objectGroup.RootPart.UUID, | ||
2754 | objectGroup.PrimCount, RootPart.Name, RootPart.UUID, | ||
2755 | PrimCount, m_scene.m_linksetCapacity); | ||
2756 | return; | ||
2757 | } | ||
2758 | |||
2741 | // 'linkPart' == the root of the group being linked into this group | 2759 | // 'linkPart' == the root of the group being linked into this group |
2742 | SceneObjectPart linkPart = objectGroup.m_rootPart; | 2760 | SceneObjectPart linkPart = objectGroup.m_rootPart; |
2743 | 2761 | ||