diff options
author | UbitUmarov | 2019-04-05 04:21:40 +0100 |
---|---|---|
committer | UbitUmarov | 2019-04-05 04:21:40 +0100 |
commit | 6485377ecd8ece0e1a998e03d5f38db9bf6890a8 (patch) | |
tree | 71920c1e15e8ad437829f3e8bffdb8a8d9814291 /OpenSim | |
parent | add option RegionViewDistance (diff) | |
download | opensim-SC-6485377ecd8ece0e1a998e03d5f38db9bf6890a8.zip opensim-SC-6485377ecd8ece0e1a998e03d5f38db9bf6890a8.tar.gz opensim-SC-6485377ecd8ece0e1a998e03d5f38db9bf6890a8.tar.bz2 opensim-SC-6485377ecd8ece0e1a998e03d5f38db9bf6890a8.tar.xz |
fix MinRegionViewDistance option (added in last commit); change regions view control
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/Scene.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 351592d..2fa92b3 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -926,7 +926,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
926 | m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance", m_defaultDrawDistance); | 926 | m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance", m_defaultDrawDistance); |
927 | m_maxDrawDistance = startupConfig.GetFloat("MaxDrawDistance", m_maxDrawDistance); | 927 | m_maxDrawDistance = startupConfig.GetFloat("MaxDrawDistance", m_maxDrawDistance); |
928 | m_maxRegionViewDistance = startupConfig.GetFloat("MaxRegionsViewDistance", m_maxRegionViewDistance); | 928 | m_maxRegionViewDistance = startupConfig.GetFloat("MaxRegionsViewDistance", m_maxRegionViewDistance); |
929 | m_minRegionViewDistance = startupConfig.GetFloat("MinRegionsViewDistance", m_maxRegionViewDistance); | 929 | m_minRegionViewDistance = startupConfig.GetFloat("MinRegionsViewDistance", m_minRegionViewDistance); |
930 | 930 | ||
931 | // old versions compatibility | 931 | // old versions compatibility |
932 | LegacySitOffsets = startupConfig.GetBoolean("LegacySitOffsets", LegacySitOffsets); | 932 | LegacySitOffsets = startupConfig.GetBoolean("LegacySitOffsets", LegacySitOffsets); |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 60a9c3a..200036c 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -342,6 +342,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
342 | private int m_lastChildUpdatesTime; | 342 | private int m_lastChildUpdatesTime; |
343 | private int m_lastChildAgentUpdateGodLevel; | 343 | private int m_lastChildAgentUpdateGodLevel; |
344 | private float m_lastChildAgentUpdateDrawDistance; | 344 | private float m_lastChildAgentUpdateDrawDistance; |
345 | private float m_lastRegionsDrawDistance; | ||
345 | private Vector3 m_lastChildAgentUpdatePosition; | 346 | private Vector3 m_lastChildAgentUpdatePosition; |
346 | private Vector3 m_lastChildAgentCheckPosition; | 347 | private Vector3 m_lastChildAgentCheckPosition; |
347 | // private Vector3 m_lastChildAgentUpdateCamPosition; | 348 | // private Vector3 m_lastChildAgentUpdateCamPosition; |
@@ -2325,6 +2326,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2325 | m_lastChildAgentUpdatePosition = AbsolutePosition; | 2326 | m_lastChildAgentUpdatePosition = AbsolutePosition; |
2326 | m_lastChildAgentCheckPosition = m_lastChildAgentUpdatePosition; | 2327 | m_lastChildAgentCheckPosition = m_lastChildAgentUpdatePosition; |
2327 | m_lastChildAgentUpdateDrawDistance = DrawDistance; | 2328 | m_lastChildAgentUpdateDrawDistance = DrawDistance; |
2329 | m_lastRegionsDrawDistance = RegionViewDistance; | ||
2328 | 2330 | ||
2329 | m_lastChildAgentUpdateGodLevel = GodController.ViwerUIGodLevel; | 2331 | m_lastChildAgentUpdateGodLevel = GodController.ViwerUIGodLevel; |
2330 | m_childUpdatesBusy = false; // allow them | 2332 | m_childUpdatesBusy = false; // allow them |
@@ -4138,6 +4140,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4138 | m_lastChildAgentUpdatePosition = AbsolutePosition; | 4140 | m_lastChildAgentUpdatePosition = AbsolutePosition; |
4139 | m_lastChildAgentCheckPosition = m_lastChildAgentUpdatePosition; | 4141 | m_lastChildAgentCheckPosition = m_lastChildAgentUpdatePosition; |
4140 | m_lastChildAgentUpdateDrawDistance = DrawDistance; | 4142 | m_lastChildAgentUpdateDrawDistance = DrawDistance; |
4143 | m_lastRegionsDrawDistance = RegionViewDistance; | ||
4141 | 4144 | ||
4142 | m_lastChildAgentUpdateGodLevel = GodController.ViwerUIGodLevel; | 4145 | m_lastChildAgentUpdateGodLevel = GodController.ViwerUIGodLevel; |
4143 | m_childUpdatesBusy = false; // allow them | 4146 | m_childUpdatesBusy = false; // allow them |
@@ -4422,7 +4425,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4422 | if (tdiff < CHILDUPDATES_TIME) | 4425 | if (tdiff < CHILDUPDATES_TIME) |
4423 | return; | 4426 | return; |
4424 | 4427 | ||
4425 | bool viewchanged = Math.Abs(DrawDistance - m_lastChildAgentUpdateDrawDistance) > 32.0f; | 4428 | bool viewchanged = Math.Abs(RegionViewDistance - m_lastRegionsDrawDistance) > 32.0f; |
4426 | 4429 | ||
4427 | IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); | 4430 | IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); |
4428 | float dx = pos.X - m_lastChildAgentCheckPosition.X; | 4431 | float dx = pos.X - m_lastChildAgentCheckPosition.X; |
@@ -4434,6 +4437,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4434 | m_lastChildAgentUpdatePosition = pos; | 4437 | m_lastChildAgentUpdatePosition = pos; |
4435 | m_lastChildAgentUpdateGodLevel = GodController.ViwerUIGodLevel; | 4438 | m_lastChildAgentUpdateGodLevel = GodController.ViwerUIGodLevel; |
4436 | m_lastChildAgentUpdateDrawDistance = DrawDistance; | 4439 | m_lastChildAgentUpdateDrawDistance = DrawDistance; |
4440 | m_lastRegionsDrawDistance = RegionViewDistance; | ||
4437 | // m_lastChildAgentUpdateCamPosition = CameraPosition; | 4441 | // m_lastChildAgentUpdateCamPosition = CameraPosition; |
4438 | 4442 | ||
4439 | Util.FireAndForget( | 4443 | Util.FireAndForget( |
@@ -4454,7 +4458,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4454 | if (m_lastChildAgentUpdateGodLevel != GodController.ViwerUIGodLevel) | 4458 | if (m_lastChildAgentUpdateGodLevel != GodController.ViwerUIGodLevel) |
4455 | doUpdate = true; | 4459 | doUpdate = true; |
4456 | 4460 | ||
4457 | if (!viewchanged) | 4461 | if (Math.Abs(DrawDistance - m_lastChildAgentUpdateDrawDistance) > 32.0f) |
4458 | doUpdate = true; | 4462 | doUpdate = true; |
4459 | 4463 | ||
4460 | if(!doUpdate) | 4464 | if(!doUpdate) |