diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 86 |
1 files changed, 82 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 9b9ad80..a5fcf4d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -103,8 +103,31 @@ namespace OpenSim.Region.Framework.Scenes | |||
103 | /// </summary> | 103 | /// </summary> |
104 | public bool CollidablePrims { get; private set; } | 104 | public bool CollidablePrims { get; private set; } |
105 | 105 | ||
106 | /// <summary> | ||
107 | /// Minimum value of the size of a non-physical prim in each axis | ||
108 | /// </summary> | ||
109 | public float m_minNonphys = 0.01f; | ||
110 | |||
111 | /// <summary> | ||
112 | /// Maximum value of the size of a non-physical prim in each axis | ||
113 | /// </summary> | ||
106 | public float m_maxNonphys = 256; | 114 | public float m_maxNonphys = 256; |
115 | |||
116 | /// <summary> | ||
117 | /// Minimum value of the size of a physical prim in each axis | ||
118 | /// </summary> | ||
119 | public float m_minPhys = 0.01f; | ||
120 | |||
121 | /// <summary> | ||
122 | /// Maximum value of the size of a physical prim in each axis | ||
123 | /// </summary> | ||
107 | public float m_maxPhys = 10; | 124 | public float m_maxPhys = 10; |
125 | |||
126 | /// <summary> | ||
127 | /// Max prims an object will hold | ||
128 | /// </summary> | ||
129 | public int m_linksetCapacity = 0; | ||
130 | |||
108 | public bool m_clampPrimSize; | 131 | public bool m_clampPrimSize; |
109 | public bool m_trustBinaries; | 132 | public bool m_trustBinaries; |
110 | public bool m_allowScriptCrossings; | 133 | public bool m_allowScriptCrossings; |
@@ -746,12 +769,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
746 | PhysicalPrims = startupConfig.GetBoolean("physical_prim", true); | 769 | PhysicalPrims = startupConfig.GetBoolean("physical_prim", true); |
747 | CollidablePrims = startupConfig.GetBoolean("collidable_prim", true); | 770 | CollidablePrims = startupConfig.GetBoolean("collidable_prim", true); |
748 | 771 | ||
772 | m_minNonphys = startupConfig.GetFloat("NonphysicalPrimMin", m_minNonphys); | ||
773 | if (RegionInfo.NonphysPrimMin > 0) | ||
774 | { | ||
775 | m_minNonphys = RegionInfo.NonphysPrimMin; | ||
776 | } | ||
777 | |||
749 | m_maxNonphys = startupConfig.GetFloat("NonphysicalPrimMax", m_maxNonphys); | 778 | m_maxNonphys = startupConfig.GetFloat("NonphysicalPrimMax", m_maxNonphys); |
750 | if (RegionInfo.NonphysPrimMax > 0) | 779 | if (RegionInfo.NonphysPrimMax > 0) |
751 | { | 780 | { |
752 | m_maxNonphys = RegionInfo.NonphysPrimMax; | 781 | m_maxNonphys = RegionInfo.NonphysPrimMax; |
753 | } | 782 | } |
754 | 783 | ||
784 | m_minPhys = startupConfig.GetFloat("PhysicalPrimMin", m_minPhys); | ||
785 | if (RegionInfo.PhysPrimMin > 0) | ||
786 | { | ||
787 | m_minPhys = RegionInfo.PhysPrimMin; | ||
788 | } | ||
789 | |||
755 | m_maxPhys = startupConfig.GetFloat("PhysicalPrimMax", m_maxPhys); | 790 | m_maxPhys = startupConfig.GetFloat("PhysicalPrimMax", m_maxPhys); |
756 | 791 | ||
757 | if (RegionInfo.PhysPrimMax > 0) | 792 | if (RegionInfo.PhysPrimMax > 0) |
@@ -759,6 +794,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
759 | m_maxPhys = RegionInfo.PhysPrimMax; | 794 | m_maxPhys = RegionInfo.PhysPrimMax; |
760 | } | 795 | } |
761 | 796 | ||
797 | m_linksetCapacity = startupConfig.GetInt("LinksetPrims", m_linksetCapacity); | ||
798 | if (RegionInfo.LinksetCapacity > 0) | ||
799 | { | ||
800 | m_linksetCapacity = RegionInfo.LinksetCapacity; | ||
801 | } | ||
802 | |||
762 | SpawnPointRouting = startupConfig.GetString("SpawnPointRouting", "closest"); | 803 | SpawnPointRouting = startupConfig.GetString("SpawnPointRouting", "closest"); |
763 | TelehubAllowLandmarks = startupConfig.GetBoolean("TelehubAllowLandmark", false); | 804 | TelehubAllowLandmarks = startupConfig.GetBoolean("TelehubAllowLandmark", false); |
764 | 805 | ||
@@ -3715,7 +3756,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3715 | "[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.", | 3756 | "[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.", |
3716 | sp.Name, sp.UUID, RegionInfo.RegionName); | 3757 | sp.Name, sp.UUID, RegionInfo.RegionName); |
3717 | 3758 | ||
3718 | sp.ControllingClient.Close(); | 3759 | sp.ControllingClient.Close(true, true); |
3719 | sp = null; | 3760 | sp = null; |
3720 | } | 3761 | } |
3721 | 3762 | ||
@@ -4318,15 +4359,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
4318 | /// Tell a single agent to disconnect from the region. | 4359 | /// Tell a single agent to disconnect from the region. |
4319 | /// </summary> | 4360 | /// </summary> |
4320 | /// <param name="agentID"></param> | 4361 | /// <param name="agentID"></param> |
4321 | /// <param name="childOnly"></param> | 4362 | /// <param name="force"> |
4322 | public bool IncomingCloseAgent(UUID agentID, bool childOnly) | 4363 | /// Force the agent to close even if it might be in the middle of some other operation. You do not want to |
4364 | /// force unless you are absolutely sure that the agent is dead and a normal close is not working. | ||
4365 | /// </param> | ||
4366 | public bool IncomingCloseAgent(UUID agentID, bool force) | ||
4323 | { | 4367 | { |
4324 | //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID); | 4368 | //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID); |
4325 | 4369 | ||
4326 | ScenePresence presence = m_sceneGraph.GetScenePresence(agentID); | 4370 | ScenePresence presence = m_sceneGraph.GetScenePresence(agentID); |
4327 | if (presence != null) | 4371 | if (presence != null) |
4328 | { | 4372 | { |
4329 | presence.ControllingClient.Close(); | 4373 | presence.ControllingClient.Close(true, force); |
4330 | return true; | 4374 | return true; |
4331 | } | 4375 | } |
4332 | 4376 | ||
@@ -4532,6 +4576,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
4532 | return LandChannel.GetLandObject(x, y).LandData; | 4576 | return LandChannel.GetLandObject(x, y).LandData; |
4533 | } | 4577 | } |
4534 | 4578 | ||
4579 | /// <summary> | ||
4580 | /// Get LandData by position. | ||
4581 | /// </summary> | ||
4582 | /// <param name="pos"></param> | ||
4583 | /// <returns></returns> | ||
4584 | public LandData GetLandData(Vector3 pos) | ||
4585 | { | ||
4586 | return GetLandData(pos.X, pos.Y); | ||
4587 | } | ||
4588 | |||
4535 | public LandData GetLandData(uint x, uint y) | 4589 | public LandData GetLandData(uint x, uint y) |
4536 | { | 4590 | { |
4537 | m_log.DebugFormat("[SCENE]: returning land for {0},{1}", x, y); | 4591 | m_log.DebugFormat("[SCENE]: returning land for {0},{1}", x, y); |
@@ -4780,6 +4834,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
4780 | } | 4834 | } |
4781 | 4835 | ||
4782 | /// <summary> | 4836 | /// <summary> |
4837 | /// Attempt to get the SOG via its UUID | ||
4838 | /// </summary> | ||
4839 | /// <param name="fullID"></param> | ||
4840 | /// <param name="sog"></param> | ||
4841 | /// <returns></returns> | ||
4842 | public bool TryGetSceneObjectGroup(UUID fullID, out SceneObjectGroup sog) | ||
4843 | { | ||
4844 | sog = GetSceneObjectGroup(fullID); | ||
4845 | return sog != null; | ||
4846 | } | ||
4847 | |||
4848 | /// <summary> | ||
4783 | /// Get a prim by name from the scene (will return the first | 4849 | /// Get a prim by name from the scene (will return the first |
4784 | /// found, if there are more than one prim with the same name) | 4850 | /// found, if there are more than one prim with the same name) |
4785 | /// </summary> | 4851 | /// </summary> |
@@ -4811,6 +4877,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
4811 | } | 4877 | } |
4812 | 4878 | ||
4813 | /// <summary> | 4879 | /// <summary> |
4880 | /// Attempt to get a prim via its UUID | ||
4881 | /// </summary> | ||
4882 | /// <param name="fullID"></param> | ||
4883 | /// <param name="sop"></param> | ||
4884 | /// <returns></returns> | ||
4885 | public bool TryGetSceneObjectPart(UUID fullID, out SceneObjectPart sop) | ||
4886 | { | ||
4887 | sop = GetSceneObjectPart(fullID); | ||
4888 | return sop != null; | ||
4889 | } | ||
4890 | |||
4891 | /// <summary> | ||
4814 | /// Get a scene object group that contains the prim with the given local id | 4892 | /// Get a scene object group that contains the prim with the given local id |
4815 | /// </summary> | 4893 | /// </summary> |
4816 | /// <param name="localID"></param> | 4894 | /// <param name="localID"></param> |