From cde3c20ba3f4f506fc69d3db54171f88223219aa Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Fri, 5 Mar 2010 17:01:31 -0800 Subject: * Fixed an order of operations bug in CheckForSignificantMovement() that was causing a flood of child updates to neighbors on login * Removed an unnecessary call to the presence service --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 465e916..4256be9 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2675,6 +2675,9 @@ namespace OpenSim.Region.Framework.Scenes if (Util.GetDistanceTo(AbsolutePosition, m_lastChildAgentUpdatePosition) >= Scene.ChildReprioritizationDistance || Util.GetDistanceTo(CameraPosition, m_lastChildAgentUpdateCamPosition) >= Scene.ChildReprioritizationDistance) { + m_lastChildAgentUpdatePosition = AbsolutePosition; + m_lastChildAgentUpdateCamPosition = CameraPosition; + ChildAgentDataUpdate cadu = new ChildAgentDataUpdate(); cadu.ActiveGroupID = UUID.Zero.Guid; cadu.AgentID = UUID.Guid; @@ -2683,8 +2686,6 @@ namespace OpenSim.Region.Framework.Scenes Vector3 tempCameraCenter = m_CameraCenter; cadu.cameraPosition = tempCameraCenter; cadu.drawdistance = m_DrawDistance; - if (m_scene.Permissions.IsGod(new UUID(cadu.AgentID))) - cadu.godlevel = m_godlevel; cadu.GroupAccess = 0; cadu.Position = AbsolutePosition; cadu.regionHandle = m_rootRegionHandle; @@ -2707,9 +2708,6 @@ namespace OpenSim.Region.Framework.Scenes agentpos.CopyFrom(cadu); m_scene.SendOutChildAgentUpdates(agentpos, this); - - m_lastChildAgentUpdatePosition = AbsolutePosition; - m_lastChildAgentUpdateCamPosition = CameraPosition; } } -- cgit v1.1