aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2016-07-06 18:58:28 +0100
committerUbitUmarov2016-07-06 18:58:28 +0100
commitd7ab1cdd15177d10a74ee01246de91fc6cfb8fd1 (patch)
treef29da0cae96ac387d894a328afb51c6dc8fb2774 /OpenSim/Region
parentthe bug was actually here (diff)
downloadopensim-SC-d7ab1cdd15177d10a74ee01246de91fc6cfb8fd1.zip
opensim-SC-d7ab1cdd15177d10a74ee01246de91fc6cfb8fd1.tar.gz
opensim-SC-d7ab1cdd15177d10a74ee01246de91fc6cfb8fd1.tar.bz2
opensim-SC-d7ab1cdd15177d10a74ee01246de91fc6cfb8fd1.tar.xz
let RePrioritization also work on child agents
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 79d628e..f20d065 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2132,10 +2132,10 @@ namespace OpenSim.Region.Framework.Scenes
2132 SendInitialDataToMe(); 2132 SendInitialDataToMe();
2133 2133
2134 // priority uses avatar position only 2134 // priority uses avatar position only
2135 m_reprioritizationLastPosition = AbsolutePosition; 2135// m_reprioritizationLastPosition = AbsolutePosition;
2136 m_reprioritizationLastDrawDistance = DrawDistance; 2136// m_reprioritizationLastDrawDistance = DrawDistance;
2137 m_reprioritizationLastTime = Util.EnvironmentTickCount() + 15000; // delay it 2137// m_reprioritizationLastTime = Util.EnvironmentTickCount() + 15000; // delay it
2138 m_reprioritizationBusy = false; 2138// m_reprioritizationBusy = false;
2139 2139
2140 m_log.DebugFormat("[CompleteMovement] SendInitialDataToMe: {0}ms", Util.EnvironmentTickCountSubtract(ts)); 2140 m_log.DebugFormat("[CompleteMovement] SendInitialDataToMe: {0}ms", Util.EnvironmentTickCountSubtract(ts));
2141 2141
@@ -3781,6 +3781,12 @@ namespace OpenSim.Region.Framework.Scenes
3781 if (e != null && e is SceneObjectGroup && !((SceneObjectGroup)e).IsAttachment) 3781 if (e != null && e is SceneObjectGroup && !((SceneObjectGroup)e).IsAttachment)
3782 ((SceneObjectGroup)e).SendFullUpdateToClient(ControllingClient); 3782 ((SceneObjectGroup)e).SendFullUpdateToClient(ControllingClient);
3783 } 3783 }
3784
3785 m_reprioritizationLastPosition = AbsolutePosition;
3786 m_reprioritizationLastDrawDistance = DrawDistance;
3787 m_reprioritizationLastTime = Util.EnvironmentTickCount() + 15000; // delay it
3788 m_reprioritizationBusy = false;
3789
3784 }); 3790 });
3785 } 3791 }
3786 3792
@@ -3997,11 +4003,13 @@ namespace OpenSim.Region.Framework.Scenes
3997 float minregionSize = (float)Scene.RegionInfo.RegionSizeX; 4003 float minregionSize = (float)Scene.RegionInfo.RegionSizeX;
3998 if(minregionSize > (float)Scene.RegionInfo.RegionSizeY) 4004 if(minregionSize > (float)Scene.RegionInfo.RegionSizeY)
3999 minregionSize = (float)Scene.RegionInfo.RegionSizeY; 4005 minregionSize = (float)Scene.RegionInfo.RegionSizeY;
4006 minregionSize *= 0.5f;
4000 if(DrawDistance > minregionSize && m_reprioritizationLastDrawDistance > minregionSize) 4007 if(DrawDistance > minregionSize && m_reprioritizationLastDrawDistance > minregionSize)
4001 byDrawdistance = false; 4008 byDrawdistance = false;
4002 else 4009 else
4003 byDrawdistance = (Math.Abs(DrawDistance-m_reprioritizationLastDrawDistance) > 0.5f * limit); 4010 byDrawdistance = (Math.Abs(DrawDistance-m_reprioritizationLastDrawDistance) > 0.5f * limit);
4004 } 4011 }
4012
4005 int tdiff = Util.EnvironmentTickCountSubtract(m_reprioritizationLastTime); 4013 int tdiff = Util.EnvironmentTickCountSubtract(m_reprioritizationLastTime);
4006 if(!byDrawdistance && tdiff < Scene.ReprioritizationInterval) 4014 if(!byDrawdistance && tdiff < Scene.ReprioritizationInterval)
4007 return; 4015 return;