diff options
author | MW | 2008-07-22 19:56:30 +0000 |
---|---|---|
committer | MW | 2008-07-22 19:56:30 +0000 |
commit | b942d18379f780760f403c6c456eb86701ce0fc6 (patch) | |
tree | 5c0ac74e715775f0594ea45afddf0af27c2ddac6 | |
parent | Refactor the packet scheduling out of ClientView. Add intelligent (diff) | |
download | opensim-SC_OLD-b942d18379f780760f403c6c456eb86701ce0fc6.zip opensim-SC_OLD-b942d18379f780760f403c6c456eb86701ce0fc6.tar.gz opensim-SC_OLD-b942d18379f780760f403c6c456eb86701ce0fc6.tar.bz2 opensim-SC_OLD-b942d18379f780760f403c6c456eb86701ce0fc6.tar.xz |
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.
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 19 |
1 files changed, 17 insertions, 2 deletions
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 | |||
1626 | /// <summary> | 1626 | /// <summary> |
1627 | /// Tell *ALL* agents about this agent | 1627 | /// Tell *ALL* agents about this agent |
1628 | /// </summary> | 1628 | /// </summary> |
1629 | public void SendFullUpdateToAllClients() | 1629 | public void SendInitialFullUpdateToAllClients() |
1630 | { | 1630 | { |
1631 | m_perfMonMS = System.Environment.TickCount; | 1631 | m_perfMonMS = System.Environment.TickCount; |
1632 | 1632 | ||
@@ -1648,6 +1648,21 @@ namespace OpenSim.Region.Environment.Scenes | |||
1648 | m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); | 1648 | m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); |
1649 | } | 1649 | } |
1650 | 1650 | ||
1651 | public void SendFullUpdateToAllClients() | ||
1652 | { | ||
1653 | m_perfMonMS = System.Environment.TickCount; | ||
1654 | |||
1655 | List<ScenePresence> avatars = m_scene.GetScenePresences(); | ||
1656 | foreach (ScenePresence avatar in avatars) | ||
1657 | { | ||
1658 | SendFullUpdateToOtherClient(avatar); | ||
1659 | |||
1660 | } | ||
1661 | m_scene.AddAgentUpdates(avatars.Count); | ||
1662 | m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); | ||
1663 | } | ||
1664 | |||
1665 | |||
1651 | /// <summary> | 1666 | /// <summary> |
1652 | /// Do everything required once a client completes its movement into a region | 1667 | /// Do everything required once a client completes its movement into a region |
1653 | /// </summary> | 1668 | /// </summary> |
@@ -1664,7 +1679,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1664 | m_scene.InformClientOfNeighbours(this); | 1679 | m_scene.InformClientOfNeighbours(this); |
1665 | } | 1680 | } |
1666 | 1681 | ||
1667 | SendFullUpdateToAllClients(); | 1682 | SendInitialFullUpdateToAllClients(); |
1668 | SendAppearanceToAllOtherAgents(); | 1683 | SendAppearanceToAllOtherAgents(); |
1669 | } | 1684 | } |
1670 | 1685 | ||