diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 6c58aaca95..2907580ab0 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -5587,6 +5587,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
///
public bool CheckAgentUpdateSignificance(AgentUpdatePacket.AgentDataBlock x)
{
+ // Compute these only once, when this function is called from down below
+ qdelta1 = 1 - (float)Math.Pow(Quaternion.Dot(x.BodyRotation, m_thisAgentUpdateArgs.BodyRotation), 2);
+ //qdelta2 = 1 - (float)Math.Pow(Quaternion.Dot(x.HeadRotation, m_thisAgentUpdateArgs.HeadRotation), 2);
+ vdelta1 = Vector3.Distance(x.CameraAtAxis, m_thisAgentUpdateArgs.CameraAtAxis);
+ vdelta2 = Vector3.Distance(x.CameraCenter, m_thisAgentUpdateArgs.CameraCenter);
+ vdelta3 = Vector3.Distance(x.CameraLeftAxis, m_thisAgentUpdateArgs.CameraLeftAxis);
+ vdelta4 = Vector3.Distance(x.CameraUpAxis, m_thisAgentUpdateArgs.CameraUpAxis);
+
return CheckAgentMovementUpdateSignificance(x) || CheckAgentCameraUpdateSignificance(x);
}
@@ -5596,10 +5604,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// Can only be called by one thread at a time
///
///
- public bool CheckAgentMovementUpdateSignificance(AgentUpdatePacket.AgentDataBlock x)
+ private bool CheckAgentMovementUpdateSignificance(AgentUpdatePacket.AgentDataBlock x)
{
- qdelta1 = 1 - (float)Math.Pow(Quaternion.Dot(x.BodyRotation, m_thisAgentUpdateArgs.BodyRotation), 2);
- qdelta2 = 1 - (float)Math.Pow(Quaternion.Dot(x.HeadRotation, m_thisAgentUpdateArgs.HeadRotation), 2);
if (
(qdelta1 > QDELTA) ||
// Ignoring head rotation altogether, because it's not being used for anything interesting up the stack
@@ -5626,12 +5632,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// Can only be called by one thread at a time
///
///
- public bool CheckAgentCameraUpdateSignificance(AgentUpdatePacket.AgentDataBlock x)
+ private bool CheckAgentCameraUpdateSignificance(AgentUpdatePacket.AgentDataBlock x)
{
- vdelta1 = Vector3.Distance(x.CameraAtAxis, m_thisAgentUpdateArgs.CameraAtAxis);
- vdelta2 = Vector3.Distance(x.CameraCenter, m_thisAgentUpdateArgs.CameraCenter);
- vdelta3 = Vector3.Distance(x.CameraLeftAxis, m_thisAgentUpdateArgs.CameraLeftAxis);
- vdelta4 = Vector3.Distance(x.CameraUpAxis, m_thisAgentUpdateArgs.CameraUpAxis);
if (
/* These 4 are the worst offenders!
* With Singularity, there is a bug where sometimes the spam on these doesn't stop */
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 55439645cd..2359f559d4 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1735,7 +1735,7 @@ namespace OpenSim.Region.Framework.Scenes
///
/// This is the event handler for client cameras. If a client is moving, or moving the camera, this event is triggering.
///
- public void HandleAgentCamerasUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData)
+ private void HandleAgentCamerasUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData)
{
//m_log.DebugFormat(
// "[SCENE PRESENCE]: In {0} received agent camera update from {1}, flags {2}",