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.

0.6.0-stable
MW 2008-07-22 19:56:30 +00:00
parent f112cebde2
commit b942d18379
1 changed files with 17 additions and 2 deletions

View File

@ -1626,7 +1626,7 @@ namespace OpenSim.Region.Environment.Scenes
/// <summary> /// <summary>
/// Tell *ALL* agents about this agent /// Tell *ALL* agents about this agent
/// </summary> /// </summary>
public void SendFullUpdateToAllClients() public void SendInitialFullUpdateToAllClients()
{ {
m_perfMonMS = System.Environment.TickCount; m_perfMonMS = System.Environment.TickCount;
@ -1648,6 +1648,21 @@ namespace OpenSim.Region.Environment.Scenes
m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
} }
public void SendFullUpdateToAllClients()
{
m_perfMonMS = System.Environment.TickCount;
List<ScenePresence> avatars = m_scene.GetScenePresences();
foreach (ScenePresence avatar in avatars)
{
SendFullUpdateToOtherClient(avatar);
}
m_scene.AddAgentUpdates(avatars.Count);
m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
}
/// <summary> /// <summary>
/// Do everything required once a client completes its movement into a region /// Do everything required once a client completes its movement into a region
/// </summary> /// </summary>
@ -1664,7 +1679,7 @@ namespace OpenSim.Region.Environment.Scenes
m_scene.InformClientOfNeighbours(this); m_scene.InformClientOfNeighbours(this);
} }
SendFullUpdateToAllClients(); SendInitialFullUpdateToAllClients();
SendAppearanceToAllOtherAgents(); SendAppearanceToAllOtherAgents();
} }