add option RegionViewDistance
parent
0652f01d4c
commit
63321f9ccc
|
@ -275,6 +275,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
get { return m_maxRegionViewDistance; }
|
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_AllowedViewers = new List<string>();
|
||||||
private List<string> m_BannedViewers = 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_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance", m_defaultDrawDistance);
|
||||||
m_maxDrawDistance = startupConfig.GetFloat("MaxDrawDistance", m_maxDrawDistance);
|
m_maxDrawDistance = startupConfig.GetFloat("MaxDrawDistance", m_maxDrawDistance);
|
||||||
m_maxRegionViewDistance = startupConfig.GetFloat("MaxRegionsViewDistance", m_maxRegionViewDistance);
|
m_maxRegionViewDistance = startupConfig.GetFloat("MaxRegionsViewDistance", m_maxRegionViewDistance);
|
||||||
|
m_minRegionViewDistance = startupConfig.GetFloat("MinRegionsViewDistance", m_maxRegionViewDistance);
|
||||||
|
|
||||||
// old versions compatibility
|
// old versions compatibility
|
||||||
LegacySitOffsets = startupConfig.GetBoolean("LegacySitOffsets", LegacySitOffsets);
|
LegacySitOffsets = startupConfig.GetBoolean("LegacySitOffsets", LegacySitOffsets);
|
||||||
|
@ -930,6 +937,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (m_maxRegionViewDistance > m_maxDrawDistance)
|
if (m_maxRegionViewDistance > m_maxDrawDistance)
|
||||||
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);
|
UseBackup = startupConfig.GetBoolean("UseSceneBackup", UseBackup);
|
||||||
if (!UseBackup)
|
if (!UseBackup)
|
||||||
m_log.InfoFormat("[SCENE]: Backup has been disabled for {0}", RegionInfo.RegionName);
|
m_log.InfoFormat("[SCENE]: Backup has been disabled for {0}", RegionInfo.RegionName);
|
||||||
|
|
|
@ -629,7 +629,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return Util.Clamp(m_drawDistance + 64f, 64f, m_scene.MaxRegionViewDistance);
|
return Util.Clamp(m_drawDistance + 64f, m_scene.MinRegionViewDistance, m_scene.MaxRegionViewDistance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -164,15 +164,10 @@
|
||||||
; limit the maximum view range ( no effect still (does limit MaxRegionsViewDistance) )
|
; limit the maximum view range ( no effect still (does limit MaxRegionsViewDistance) )
|
||||||
;MaxDrawDistance = 512
|
;MaxDrawDistance = 512
|
||||||
|
|
||||||
; the maximum distance to tell a viewer to connect to a neighbour region, so it can be seen
|
; Other regions visibilty depends on avatar position and view range
|
||||||
; (it is limited by MaxDrawDistance above)
|
; the view range considered is limited the maximum and minimum distances:
|
||||||
; 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
|
|
||||||
; *****
|
|
||||||
;MaxRegionsViewDistance = 255
|
;MaxRegionsViewDistance = 255
|
||||||
|
;MinRegionsViewDistance = 96
|
||||||
|
|
||||||
; If you have only one region in an instance, or to avoid the many bugs
|
; 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
|
; that you can trigger in modules by restarting a region, set this to
|
||||||
|
|
Loading…
Reference in New Issue