aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2015-12-17 12:24:37 +0000
committerUbitUmarov2015-12-17 12:24:37 +0000
commited74fb5da404927e6cad8745d90ee6db9b5faa23 (patch)
treeb18c4e5f221cced58d8924269cbdc3463f66d130
parentchange updates reprioritization control code. Do it under normal avatar updat... (diff)
downloadopensim-SC_OLD-ed74fb5da404927e6cad8745d90ee6db9b5faa23.zip
opensim-SC_OLD-ed74fb5da404927e6cad8745d90ee6db9b5faa23.tar.gz
opensim-SC_OLD-ed74fb5da404927e6cad8745d90ee6db9b5faa23.tar.bz2
opensim-SC_OLD-ed74fb5da404927e6cad8745d90ee6db9b5faa23.tar.xz
save a expensive call to CameraPosition
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 9b82380..553e293 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3880,7 +3880,8 @@ namespace OpenSim.Region.Framework.Scenes
3880 if(tdiff < Scene.ReprioritizationInterval) 3880 if(tdiff < Scene.ReprioritizationInterval)
3881 return; 3881 return;
3882 3882
3883 Vector3 diff = CameraPosition - m_lastCameraPosition; 3883 Vector3 pos = CameraPosition;
3884 Vector3 diff = pos - m_lastCameraPosition;
3884 float limit; 3885 float limit;
3885 if(IsChildAgent) 3886 if(IsChildAgent)
3886 limit = (float)Scene.ChildReprioritizationDistance; 3887 limit = (float)Scene.ChildReprioritizationDistance;
@@ -3892,7 +3893,7 @@ namespace OpenSim.Region.Framework.Scenes
3892 return; 3893 return;
3893 3894
3894 m_reprioritizationBusy = true; 3895 m_reprioritizationBusy = true;
3895 m_lastCameraPosition = CameraPosition; 3896 m_lastCameraPosition = pos;
3896 3897
3897 Util.FireAndForget( 3898 Util.FireAndForget(
3898 o => 3899 o =>