From 3a6acbcc149fb359c2be2ee2c646c9b15809c01e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 19 Jul 2013 01:00:38 +0100 Subject: furhter shorten CheckAgentUpdateSignificance(). No real perf impact. --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index c5bb697..3d085c3 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -5582,8 +5582,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // These should be ordered from most-likely to // least likely to change. I've made an initial // guess at that. - bool update = - ( + if ( (x.BodyRotation != m_lastAgentUpdateArgs.BodyRotation) || (x.CameraAtAxis != m_lastAgentUpdateArgs.CameraAtAxis) || (x.CameraCenter != m_lastAgentUpdateArgs.CameraCenter) || @@ -5596,10 +5595,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP (x.HeadRotation != m_lastAgentUpdateArgs.HeadRotation) || (x.SessionID != m_lastAgentUpdateArgs.SessionID) || (x.AgentID != m_lastAgentUpdateArgs.AgentID) - ); - - - if (update) + ) { // m_log.DebugFormat("[LLCLIENTVIEW]: Triggered AgentUpdate for {0}", sener.Name); TotalSignificantAgentUpdates++; @@ -5616,9 +5612,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_lastAgentUpdateArgs.HeadRotation = x.HeadRotation; m_lastAgentUpdateArgs.SessionID = x.SessionID; m_lastAgentUpdateArgs.State = x.State; + + return true; } - return update; + return false; } private bool HandleAgentUpdate(IClientAPI sener, Packet packet) -- cgit v1.1