From ed74fb5da404927e6cad8745d90ee6db9b5faa23 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 17 Dec 2015 12:24:37 +0000 Subject: [PATCH] save a expensive call to CameraPosition --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 9b82380fa4..553e2932f0 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3880,7 +3880,8 @@ namespace OpenSim.Region.Framework.Scenes if(tdiff < Scene.ReprioritizationInterval) return; - Vector3 diff = CameraPosition - m_lastCameraPosition; + Vector3 pos = CameraPosition; + Vector3 diff = pos - m_lastCameraPosition; float limit; if(IsChildAgent) limit = (float)Scene.ChildReprioritizationDistance; @@ -3892,7 +3893,7 @@ namespace OpenSim.Region.Framework.Scenes return; m_reprioritizationBusy = true; - m_lastCameraPosition = CameraPosition; + m_lastCameraPosition = pos; Util.FireAndForget( o =>