diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index e130bd7bc2..351592da17 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -275,6 +275,12 @@ namespace OpenSim.Region.Framework.Scenes get { return m_maxRegionViewDistance; } } + protected float m_minRegionViewDistance = 96f; + public float MinRegionViewDistance + { + get { return m_minRegionViewDistance; } + } + private List m_AllowedViewers = new List(); private List m_BannedViewers = new List(); @@ -920,6 +926,7 @@ namespace OpenSim.Region.Framework.Scenes m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance", m_defaultDrawDistance); m_maxDrawDistance = startupConfig.GetFloat("MaxDrawDistance", m_maxDrawDistance); m_maxRegionViewDistance = startupConfig.GetFloat("MaxRegionsViewDistance", m_maxRegionViewDistance); + m_minRegionViewDistance = startupConfig.GetFloat("MinRegionsViewDistance", m_maxRegionViewDistance); // old versions compatibility LegacySitOffsets = startupConfig.GetBoolean("LegacySitOffsets", LegacySitOffsets); @@ -930,6 +937,11 @@ namespace OpenSim.Region.Framework.Scenes if (m_maxRegionViewDistance > m_maxDrawDistance) m_maxRegionViewDistance = m_maxDrawDistance; + if(m_minRegionViewDistance < 96f) + m_minRegionViewDistance = 96f; + if(m_minRegionViewDistance > m_maxRegionViewDistance) + m_minRegionViewDistance = m_maxRegionViewDistance; + UseBackup = startupConfig.GetBoolean("UseSceneBackup", UseBackup); if (!UseBackup) m_log.InfoFormat("[SCENE]: Backup has been disabled for {0}", RegionInfo.RegionName); diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index f9d1f54b46..60a9c3a398 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -629,7 +629,7 @@ namespace OpenSim.Region.Framework.Scenes { get { - return Util.Clamp(m_drawDistance + 64f, 64f, m_scene.MaxRegionViewDistance); + return Util.Clamp(m_drawDistance + 64f, m_scene.MinRegionViewDistance, m_scene.MaxRegionViewDistance); } } diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 0b5616351b..9518aaf0a4 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -164,15 +164,10 @@ ; limit the maximum view range ( no effect still (does limit MaxRegionsViewDistance) ) ;MaxDrawDistance = 512 - ; the maximum distance to tell a viewer to connect to a neighbour region, so it can be seen - ; (it is limited by MaxDrawDistance above) - ; less than 256 shows immediate neighbours; 256 to 511 also second imediate neighbours etc - ; more than 511m can cause viewers problems specially in case of dense regions. - ; curretly this distance is from current region borders. - ; Warning: if relevant regions have different setting you may notice strange - ; effects due to that asymmetry - ; ***** + ; Other regions visibilty depends on avatar position and view range + ; the view range considered is limited the maximum and minimum distances: ;MaxRegionsViewDistance = 255 + ;MinRegionsViewDistance = 96 ; If you have only one region in an instance, or to avoid the many bugs ; that you can trigger in modules by restarting a region, set this to