fix MinRegionViewDistance option (added in last commit); change regions view control

0.9.1.0-post-fixes
UbitUmarov 2019-04-05 04:21:40 +01:00
parent 63321f9ccc
commit 6485377ecd
2 changed files with 7 additions and 3 deletions

View File

@ -926,7 +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); m_minRegionViewDistance = startupConfig.GetFloat("MinRegionsViewDistance", m_minRegionViewDistance);
// old versions compatibility // old versions compatibility
LegacySitOffsets = startupConfig.GetBoolean("LegacySitOffsets", LegacySitOffsets); LegacySitOffsets = startupConfig.GetBoolean("LegacySitOffsets", LegacySitOffsets);

View File

@ -342,6 +342,7 @@ namespace OpenSim.Region.Framework.Scenes
private int m_lastChildUpdatesTime; private int m_lastChildUpdatesTime;
private int m_lastChildAgentUpdateGodLevel; private int m_lastChildAgentUpdateGodLevel;
private float m_lastChildAgentUpdateDrawDistance; private float m_lastChildAgentUpdateDrawDistance;
private float m_lastRegionsDrawDistance;
private Vector3 m_lastChildAgentUpdatePosition; private Vector3 m_lastChildAgentUpdatePosition;
private Vector3 m_lastChildAgentCheckPosition; private Vector3 m_lastChildAgentCheckPosition;
// private Vector3 m_lastChildAgentUpdateCamPosition; // private Vector3 m_lastChildAgentUpdateCamPosition;
@ -2325,6 +2326,7 @@ namespace OpenSim.Region.Framework.Scenes
m_lastChildAgentUpdatePosition = AbsolutePosition; m_lastChildAgentUpdatePosition = AbsolutePosition;
m_lastChildAgentCheckPosition = m_lastChildAgentUpdatePosition; m_lastChildAgentCheckPosition = m_lastChildAgentUpdatePosition;
m_lastChildAgentUpdateDrawDistance = DrawDistance; m_lastChildAgentUpdateDrawDistance = DrawDistance;
m_lastRegionsDrawDistance = RegionViewDistance;
m_lastChildAgentUpdateGodLevel = GodController.ViwerUIGodLevel; m_lastChildAgentUpdateGodLevel = GodController.ViwerUIGodLevel;
m_childUpdatesBusy = false; // allow them m_childUpdatesBusy = false; // allow them
@ -4138,6 +4140,7 @@ namespace OpenSim.Region.Framework.Scenes
m_lastChildAgentUpdatePosition = AbsolutePosition; m_lastChildAgentUpdatePosition = AbsolutePosition;
m_lastChildAgentCheckPosition = m_lastChildAgentUpdatePosition; m_lastChildAgentCheckPosition = m_lastChildAgentUpdatePosition;
m_lastChildAgentUpdateDrawDistance = DrawDistance; m_lastChildAgentUpdateDrawDistance = DrawDistance;
m_lastRegionsDrawDistance = RegionViewDistance;
m_lastChildAgentUpdateGodLevel = GodController.ViwerUIGodLevel; m_lastChildAgentUpdateGodLevel = GodController.ViwerUIGodLevel;
m_childUpdatesBusy = false; // allow them m_childUpdatesBusy = false; // allow them
@ -4422,7 +4425,7 @@ namespace OpenSim.Region.Framework.Scenes
if (tdiff < CHILDUPDATES_TIME) if (tdiff < CHILDUPDATES_TIME)
return; return;
bool viewchanged = Math.Abs(DrawDistance - m_lastChildAgentUpdateDrawDistance) > 32.0f; bool viewchanged = Math.Abs(RegionViewDistance - m_lastRegionsDrawDistance) > 32.0f;
IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>();
float dx = pos.X - m_lastChildAgentCheckPosition.X; float dx = pos.X - m_lastChildAgentCheckPosition.X;
@ -4434,6 +4437,7 @@ namespace OpenSim.Region.Framework.Scenes
m_lastChildAgentUpdatePosition = pos; m_lastChildAgentUpdatePosition = pos;
m_lastChildAgentUpdateGodLevel = GodController.ViwerUIGodLevel; m_lastChildAgentUpdateGodLevel = GodController.ViwerUIGodLevel;
m_lastChildAgentUpdateDrawDistance = DrawDistance; m_lastChildAgentUpdateDrawDistance = DrawDistance;
m_lastRegionsDrawDistance = RegionViewDistance;
// m_lastChildAgentUpdateCamPosition = CameraPosition; // m_lastChildAgentUpdateCamPosition = CameraPosition;
Util.FireAndForget( Util.FireAndForget(
@ -4454,7 +4458,7 @@ namespace OpenSim.Region.Framework.Scenes
if (m_lastChildAgentUpdateGodLevel != GodController.ViwerUIGodLevel) if (m_lastChildAgentUpdateGodLevel != GodController.ViwerUIGodLevel)
doUpdate = true; doUpdate = true;
if (!viewchanged) if (Math.Abs(DrawDistance - m_lastChildAgentUpdateDrawDistance) > 32.0f)
doUpdate = true; doUpdate = true;
if(!doUpdate) if(!doUpdate)