aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs13
1 files changed, 10 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 817ed43..79d628e 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3993,8 +3993,15 @@ namespace OpenSim.Region.Framework.Scenes
3993 float limit = Scene.ReprioritizationDistance; 3993 float limit = Scene.ReprioritizationDistance;
3994 bool byDrawdistance = Scene.ObjectsCullingByDistance; 3994 bool byDrawdistance = Scene.ObjectsCullingByDistance;
3995 if(byDrawdistance) 3995 if(byDrawdistance)
3996 byDrawdistance = (Math.Abs(DrawDistance-m_reprioritizationLastDrawDistance) > 0.5f * limit); 3996 {
3997 3997 float minregionSize = (float)Scene.RegionInfo.RegionSizeX;
3998 if(minregionSize > (float)Scene.RegionInfo.RegionSizeY)
3999 minregionSize = (float)Scene.RegionInfo.RegionSizeY;
4000 if(DrawDistance > minregionSize && m_reprioritizationLastDrawDistance > minregionSize)
4001 byDrawdistance = false;
4002 else
4003 byDrawdistance = (Math.Abs(DrawDistance-m_reprioritizationLastDrawDistance) > 0.5f * limit);
4004 }
3998 int tdiff = Util.EnvironmentTickCountSubtract(m_reprioritizationLastTime); 4005 int tdiff = Util.EnvironmentTickCountSubtract(m_reprioritizationLastTime);
3999 if(!byDrawdistance && tdiff < Scene.ReprioritizationInterval) 4006 if(!byDrawdistance && tdiff < Scene.ReprioritizationInterval)
4000 return; 4007 return;
@@ -4012,7 +4019,7 @@ namespace OpenSim.Region.Framework.Scenes
4012 Util.FireAndForget( 4019 Util.FireAndForget(
4013 o => 4020 o =>
4014 { 4021 {
4015 ControllingClient.ReprioritizeUpdates(); 4022 ControllingClient.ReprioritizeUpdates();
4016 m_reprioritizationLastTime = Util.EnvironmentTickCount(); 4023 m_reprioritizationLastTime = Util.EnvironmentTickCount();
4017 m_reprioritizationBusy = false; 4024 m_reprioritizationBusy = false;
4018 }, null, "ScenePresence.Reprioritization"); 4025 }, null, "ScenePresence.Reprioritization");