From b942d18379f780760f403c6c456eb86701ce0fc6 Mon Sep 17 00:00:00 2001 From: MW Date: Tue, 22 Jul 2008 19:56:30 +0000 Subject: renamed ScenePresence.SendFullUpdateToAllClients() to SendInitialFullUpdateToAllClients(), and added a replacement SendFullUpdateToAllClients() method. As the old one (now "Initial") has extra steps in it for sending initial updates/date, Not only was this leading to a lot more data being sent than needed to be, every time it was called. It also seems to have been causing the "other Avatars rotating when you sit down" bug. --- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index cfda41e..39718dc 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -1626,7 +1626,7 @@ namespace OpenSim.Region.Environment.Scenes /// /// Tell *ALL* agents about this agent /// - public void SendFullUpdateToAllClients() + public void SendInitialFullUpdateToAllClients() { m_perfMonMS = System.Environment.TickCount; @@ -1648,6 +1648,21 @@ namespace OpenSim.Region.Environment.Scenes m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); } + public void SendFullUpdateToAllClients() + { + m_perfMonMS = System.Environment.TickCount; + + List avatars = m_scene.GetScenePresences(); + foreach (ScenePresence avatar in avatars) + { + SendFullUpdateToOtherClient(avatar); + + } + m_scene.AddAgentUpdates(avatars.Count); + m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); + } + + /// /// Do everything required once a client completes its movement into a region /// @@ -1664,7 +1679,7 @@ namespace OpenSim.Region.Environment.Scenes m_scene.InformClientOfNeighbours(this); } - SendFullUpdateToAllClients(); + SendInitialFullUpdateToAllClients(); SendAppearanceToAllOtherAgents(); } -- cgit v1.1