From beafc99d434758647ecfed705eba67b190e5f587 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 6 Jul 2016 17:31:05 +0100 Subject: [PATCH] bug fix, etc --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 817ed4359e..79d628e75a 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3993,8 +3993,15 @@ namespace OpenSim.Region.Framework.Scenes float limit = Scene.ReprioritizationDistance; bool byDrawdistance = Scene.ObjectsCullingByDistance; if(byDrawdistance) - byDrawdistance = (Math.Abs(DrawDistance-m_reprioritizationLastDrawDistance) > 0.5f * limit); - + { + float minregionSize = (float)Scene.RegionInfo.RegionSizeX; + if(minregionSize > (float)Scene.RegionInfo.RegionSizeY) + minregionSize = (float)Scene.RegionInfo.RegionSizeY; + if(DrawDistance > minregionSize && m_reprioritizationLastDrawDistance > minregionSize) + byDrawdistance = false; + else + byDrawdistance = (Math.Abs(DrawDistance-m_reprioritizationLastDrawDistance) > 0.5f * limit); + } int tdiff = Util.EnvironmentTickCountSubtract(m_reprioritizationLastTime); if(!byDrawdistance && tdiff < Scene.ReprioritizationInterval) return; @@ -4012,7 +4019,7 @@ namespace OpenSim.Region.Framework.Scenes Util.FireAndForget( o => { - ControllingClient.ReprioritizeUpdates(); + ControllingClient.ReprioritizeUpdates(); m_reprioritizationLastTime = Util.EnvironmentTickCount(); m_reprioritizationBusy = false; }, null, "ScenePresence.Reprioritization");