diff options
author | UbitUmarov | 2019-04-05 04:08:14 +0100 |
---|---|---|
committer | UbitUmarov | 2019-04-05 04:08:14 +0100 |
commit | 63321f9ccc1e35db8034da64c510f334e7d5e7d5 (patch) | |
tree | 5ed9a55d501a1c3262bbdcfb955c4a9f59083665 | |
parent | duhhh npcs don't have child agents; plus minor typos (diff) | |
download | opensim-SC-63321f9ccc1e35db8034da64c510f334e7d5e7d5.zip opensim-SC-63321f9ccc1e35db8034da64c510f334e7d5e7d5.tar.gz opensim-SC-63321f9ccc1e35db8034da64c510f334e7d5e7d5.tar.bz2 opensim-SC-63321f9ccc1e35db8034da64c510f334e7d5e7d5.tar.xz |
add option RegionViewDistance
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/Scene.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 | ||||
-rw-r--r-- | bin/OpenSimDefaults.ini | 11 |
3 files changed, 16 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index e130bd7..351592d 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -275,6 +275,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
275 | get { return m_maxRegionViewDistance; } | 275 | get { return m_maxRegionViewDistance; } |
276 | } | 276 | } |
277 | 277 | ||
278 | protected float m_minRegionViewDistance = 96f; | ||
279 | public float MinRegionViewDistance | ||
280 | { | ||
281 | get { return m_minRegionViewDistance; } | ||
282 | } | ||
283 | |||
278 | private List<string> m_AllowedViewers = new List<string>(); | 284 | private List<string> m_AllowedViewers = new List<string>(); |
279 | private List<string> m_BannedViewers = new List<string>(); | 285 | private List<string> m_BannedViewers = new List<string>(); |
280 | 286 | ||
@@ -920,6 +926,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
920 | m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance", m_defaultDrawDistance); | 926 | m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance", m_defaultDrawDistance); |
921 | m_maxDrawDistance = startupConfig.GetFloat("MaxDrawDistance", m_maxDrawDistance); | 927 | m_maxDrawDistance = startupConfig.GetFloat("MaxDrawDistance", m_maxDrawDistance); |
922 | m_maxRegionViewDistance = startupConfig.GetFloat("MaxRegionsViewDistance", m_maxRegionViewDistance); | 928 | m_maxRegionViewDistance = startupConfig.GetFloat("MaxRegionsViewDistance", m_maxRegionViewDistance); |
929 | m_minRegionViewDistance = startupConfig.GetFloat("MinRegionsViewDistance", m_maxRegionViewDistance); | ||
923 | 930 | ||
924 | // old versions compatibility | 931 | // old versions compatibility |
925 | LegacySitOffsets = startupConfig.GetBoolean("LegacySitOffsets", LegacySitOffsets); | 932 | LegacySitOffsets = startupConfig.GetBoolean("LegacySitOffsets", LegacySitOffsets); |
@@ -930,6 +937,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
930 | if (m_maxRegionViewDistance > m_maxDrawDistance) | 937 | if (m_maxRegionViewDistance > m_maxDrawDistance) |
931 | m_maxRegionViewDistance = m_maxDrawDistance; | 938 | m_maxRegionViewDistance = m_maxDrawDistance; |
932 | 939 | ||
940 | if(m_minRegionViewDistance < 96f) | ||
941 | m_minRegionViewDistance = 96f; | ||
942 | if(m_minRegionViewDistance > m_maxRegionViewDistance) | ||
943 | m_minRegionViewDistance = m_maxRegionViewDistance; | ||
944 | |||
933 | UseBackup = startupConfig.GetBoolean("UseSceneBackup", UseBackup); | 945 | UseBackup = startupConfig.GetBoolean("UseSceneBackup", UseBackup); |
934 | if (!UseBackup) | 946 | if (!UseBackup) |
935 | m_log.InfoFormat("[SCENE]: Backup has been disabled for {0}", RegionInfo.RegionName); | 947 | 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 f9d1f54..60a9c3a 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -629,7 +629,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
629 | { | 629 | { |
630 | get | 630 | get |
631 | { | 631 | { |
632 | return Util.Clamp(m_drawDistance + 64f, 64f, m_scene.MaxRegionViewDistance); | 632 | return Util.Clamp(m_drawDistance + 64f, m_scene.MinRegionViewDistance, m_scene.MaxRegionViewDistance); |
633 | } | 633 | } |
634 | } | 634 | } |
635 | 635 | ||
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 0b56163..9518aaf 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini | |||
@@ -164,15 +164,10 @@ | |||
164 | ; limit the maximum view range ( no effect still (does limit MaxRegionsViewDistance) ) | 164 | ; limit the maximum view range ( no effect still (does limit MaxRegionsViewDistance) ) |
165 | ;MaxDrawDistance = 512 | 165 | ;MaxDrawDistance = 512 |
166 | 166 | ||
167 | ; the maximum distance to tell a viewer to connect to a neighbour region, so it can be seen | 167 | ; Other regions visibilty depends on avatar position and view range |
168 | ; (it is limited by MaxDrawDistance above) | 168 | ; the view range considered is limited the maximum and minimum distances: |
169 | ; less than 256 shows immediate neighbours; 256 to 511 also second imediate neighbours etc | ||
170 | ; more than 511m can cause viewers problems specially in case of dense regions. | ||
171 | ; curretly this distance is from current region borders. | ||
172 | ; Warning: if relevant regions have different setting you may notice strange | ||
173 | ; effects due to that asymmetry | ||
174 | ; ***** | ||
175 | ;MaxRegionsViewDistance = 255 | 169 | ;MaxRegionsViewDistance = 255 |
170 | ;MinRegionsViewDistance = 96 | ||
176 | 171 | ||
177 | ; If you have only one region in an instance, or to avoid the many bugs | 172 | ; If you have only one region in an instance, or to avoid the many bugs |
178 | ; that you can trigger in modules by restarting a region, set this to | 173 | ; that you can trigger in modules by restarting a region, set this to |