add option RegionViewDistance

0.9.1.0-post-fixes
UbitUmarov 2019-04-05 04:08:14 +01:00
parent 0652f01d4c
commit 63321f9ccc
3 changed files with 16 additions and 9 deletions

View File

@ -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<string> m_AllowedViewers = new List<string>();
private List<string> m_BannedViewers = new List<string>();
@ -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);

View File

@ -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);
}
}

View File

@ -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