aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs93
1 files changed, 88 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 8034bc6..29c8eb1 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.001f;
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
749 m_maxNonphys = startupConfig.GetFloat("NonphysicalPrimMax", m_maxNonphys); 772 m_minNonphys = startupConfig.GetFloat("NonPhysicalPrimMin", m_minNonphys);
773 if (RegionInfo.NonphysPrimMin > 0)
774 {
775 m_minNonphys = RegionInfo.NonphysPrimMin;
776 }
777
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
@@ -854,6 +895,8 @@ namespace OpenSim.Region.Framework.Scenes
854 } 895 }
855 896
856 // FIXME: Ultimately this should be in a module. 897 // FIXME: Ultimately this should be in a module.
898 SendPeriodicAppearanceUpdates = true;
899
857 IConfig appearanceConfig = m_config.Configs["Appearance"]; 900 IConfig appearanceConfig = m_config.Configs["Appearance"];
858 if (appearanceConfig != null) 901 if (appearanceConfig != null)
859 { 902 {
@@ -3715,7 +3758,7 @@ namespace OpenSim.Region.Framework.Scenes
3715 "[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.", 3758 "[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.",
3716 sp.Name, sp.UUID, RegionInfo.RegionName); 3759 sp.Name, sp.UUID, RegionInfo.RegionName);
3717 3760
3718 sp.ControllingClient.Close(); 3761 sp.ControllingClient.Close(true, true);
3719 sp = null; 3762 sp = null;
3720 } 3763 }
3721 3764
@@ -4318,15 +4361,18 @@ namespace OpenSim.Region.Framework.Scenes
4318 /// Tell a single agent to disconnect from the region. 4361 /// Tell a single agent to disconnect from the region.
4319 /// </summary> 4362 /// </summary>
4320 /// <param name="agentID"></param> 4363 /// <param name="agentID"></param>
4321 /// <param name="childOnly"></param> 4364 /// <param name="force">
4322 public bool IncomingCloseAgent(UUID agentID, bool childOnly) 4365 /// Force the agent to close even if it might be in the middle of some other operation. You do not want to
4366 /// force unless you are absolutely sure that the agent is dead and a normal close is not working.
4367 /// </param>
4368 public bool IncomingCloseAgent(UUID agentID, bool force)
4323 { 4369 {
4324 //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID); 4370 //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID);
4325 4371
4326 ScenePresence presence = m_sceneGraph.GetScenePresence(agentID); 4372 ScenePresence presence = m_sceneGraph.GetScenePresence(agentID);
4327 if (presence != null) 4373 if (presence != null)
4328 { 4374 {
4329 presence.ControllingClient.Close(false); 4375 presence.ControllingClient.Close(force, force);
4330 return true; 4376 return true;
4331 } 4377 }
4332 4378
@@ -4532,6 +4578,16 @@ namespace OpenSim.Region.Framework.Scenes
4532 return LandChannel.GetLandObject(x, y).LandData; 4578 return LandChannel.GetLandObject(x, y).LandData;
4533 } 4579 }
4534 4580
4581 /// <summary>
4582 /// Get LandData by position.
4583 /// </summary>
4584 /// <param name="pos"></param>
4585 /// <returns></returns>
4586 public LandData GetLandData(Vector3 pos)
4587 {
4588 return GetLandData(pos.X, pos.Y);
4589 }
4590
4535 public LandData GetLandData(uint x, uint y) 4591 public LandData GetLandData(uint x, uint y)
4536 { 4592 {
4537 m_log.DebugFormat("[SCENE]: returning land for {0},{1}", x, y); 4593 m_log.DebugFormat("[SCENE]: returning land for {0},{1}", x, y);
@@ -4780,6 +4836,18 @@ namespace OpenSim.Region.Framework.Scenes
4780 } 4836 }
4781 4837
4782 /// <summary> 4838 /// <summary>
4839 /// Attempt to get the SOG via its UUID
4840 /// </summary>
4841 /// <param name="fullID"></param>
4842 /// <param name="sog"></param>
4843 /// <returns></returns>
4844 public bool TryGetSceneObjectGroup(UUID fullID, out SceneObjectGroup sog)
4845 {
4846 sog = GetSceneObjectGroup(fullID);
4847 return sog != null;
4848 }
4849
4850 /// <summary>
4783 /// Get a prim by name from the scene (will return the first 4851 /// 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) 4852 /// found, if there are more than one prim with the same name)
4785 /// </summary> 4853 /// </summary>
@@ -4811,6 +4879,18 @@ namespace OpenSim.Region.Framework.Scenes
4811 } 4879 }
4812 4880
4813 /// <summary> 4881 /// <summary>
4882 /// Attempt to get a prim via its UUID
4883 /// </summary>
4884 /// <param name="fullID"></param>
4885 /// <param name="sop"></param>
4886 /// <returns></returns>
4887 public bool TryGetSceneObjectPart(UUID fullID, out SceneObjectPart sop)
4888 {
4889 sop = GetSceneObjectPart(fullID);
4890 return sop != null;
4891 }
4892
4893 /// <summary>
4814 /// Get a scene object group that contains the prim with the given local id 4894 /// Get a scene object group that contains the prim with the given local id
4815 /// </summary> 4895 /// </summary>
4816 /// <param name="localID"></param> 4896 /// <param name="localID"></param>
@@ -5865,6 +5945,9 @@ Environment.Exit(1);
5865 5945
5866 public string GetExtraSetting(string name) 5946 public string GetExtraSetting(string name)
5867 { 5947 {
5948 if (m_extraSettings == null)
5949 return String.Empty;
5950
5868 string val; 5951 string val;
5869 5952
5870 if (!m_extraSettings.TryGetValue(name, out val)) 5953 if (!m_extraSettings.TryGetValue(name, out val))