Remove some pointless code in CheckAgentUpdateSignificance()

cpu-performance
Justin Clark-Casey (justincc) 2013-07-19 00:56:45 +01:00
parent 3b8e7ff013
commit 42e5856464
1 changed files with 19 additions and 29 deletions

View File

@ -5574,20 +5574,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <summary> /// <summary>
/// This checks the update significance against the last update made. /// This checks the update significance against the last update made.
/// </summary> /// </summary>
/// <remarks>Can only be called by one thread at a time, and not at the same time as </remarks> /// <remarks>Can only be called by one thread at a time</remarks>
///
/// <returns>/returns> /// <returns>/returns>
/// <param name='x'></param> /// <param name='x'></param>
public bool CheckAgentUpdateSignificance(AgentUpdatePacket.AgentDataBlock x) public bool CheckAgentUpdateSignificance(AgentUpdatePacket.AgentDataBlock x)
{
bool update = false;
if (m_lastAgentUpdateArgs != null)
{ {
// These should be ordered from most-likely to // These should be ordered from most-likely to
// least likely to change. I've made an initial // least likely to change. I've made an initial
// guess at that. // guess at that.
update = bool update =
( (
(x.BodyRotation != m_lastAgentUpdateArgs.BodyRotation) || (x.BodyRotation != m_lastAgentUpdateArgs.BodyRotation) ||
(x.CameraAtAxis != m_lastAgentUpdateArgs.CameraAtAxis) || (x.CameraAtAxis != m_lastAgentUpdateArgs.CameraAtAxis) ||
@ -5602,12 +5597,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
(x.SessionID != m_lastAgentUpdateArgs.SessionID) || (x.SessionID != m_lastAgentUpdateArgs.SessionID) ||
(x.AgentID != m_lastAgentUpdateArgs.AgentID) (x.AgentID != m_lastAgentUpdateArgs.AgentID)
); );
}
else
{
m_lastAgentUpdateArgs = new AgentUpdateArgs();
update = true;
}
if (update) if (update)
{ {