diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 37 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 51 |
2 files changed, 43 insertions, 45 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index c14b39a..19144a7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1490,51 +1490,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
1490 | 1490 | ||
1491 | #endregion | 1491 | #endregion |
1492 | 1492 | ||
1493 | #region Client Updating | ||
1494 | |||
1495 | public void SendFullUpdateToClient(IClientAPI remoteClient) | 1493 | public void SendFullUpdateToClient(IClientAPI remoteClient) |
1496 | { | 1494 | { |
1497 | SendPartFullUpdate(remoteClient, RootPart, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, RootPart.UUID)); | 1495 | RootPart.SendFullUpdate( |
1496 | remoteClient, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, RootPart.UUID)); | ||
1498 | 1497 | ||
1499 | lock (m_parts) | 1498 | lock (m_parts) |
1500 | { | 1499 | { |
1501 | foreach (SceneObjectPart part in m_parts.Values) | 1500 | foreach (SceneObjectPart part in m_parts.Values) |
1502 | { | 1501 | { |
1503 | if (part != RootPart) | 1502 | if (part != RootPart) |
1504 | SendPartFullUpdate(remoteClient, part, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, part.UUID)); | 1503 | part.SendFullUpdate( |
1504 | remoteClient, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, part.UUID)); | ||
1505 | } | 1505 | } |
1506 | } | 1506 | } |
1507 | } | 1507 | } |
1508 | 1508 | ||
1509 | /// <summary> | ||
1510 | /// Send a full update to the client for the given part | ||
1511 | /// </summary> | ||
1512 | /// <param name="remoteClient"></param> | ||
1513 | /// <param name="part"></param> | ||
1514 | internal void SendPartFullUpdate(IClientAPI remoteClient, SceneObjectPart part, uint clientFlags) | ||
1515 | { | ||
1516 | // m_log.DebugFormat( | ||
1517 | // "[SOG]: Sendinging part full update to {0} for {1} {2}", remoteClient.Name, part.Name, part.LocalId); | ||
1518 | |||
1519 | if (m_rootPart.UUID == part.UUID) | ||
1520 | { | ||
1521 | if (IsAttachment) | ||
1522 | { | ||
1523 | part.SendFullUpdateToClient(remoteClient, m_rootPart.AttachedPos, clientFlags); | ||
1524 | } | ||
1525 | else | ||
1526 | { | ||
1527 | part.SendFullUpdateToClient(remoteClient, AbsolutePosition, clientFlags); | ||
1528 | } | ||
1529 | } | ||
1530 | else | ||
1531 | { | ||
1532 | part.SendFullUpdateToClient(remoteClient, clientFlags); | ||
1533 | } | ||
1534 | } | ||
1535 | |||
1536 | #endregion | ||
1537 | |||
1538 | #region Copying | 1509 | #region Copying |
1539 | 1510 | ||
1540 | /// <summary> | 1511 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 5c283bc..b8c8d88 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2834,29 +2834,59 @@ namespace OpenSim.Region.Framework.Scenes | |||
2834 | } | 2834 | } |
2835 | } | 2835 | } |
2836 | 2836 | ||
2837 | // /// <summary> | ||
2838 | // /// | ||
2839 | // /// </summary> | ||
2840 | // /// <param name="remoteClient"></param> | ||
2841 | // public void SendFullUpdate(IClientAPI remoteClient, uint clientFlags) | ||
2842 | // { | ||
2843 | // m_parentGroup.SendPartFullUpdate(remoteClient, this, clientFlags); | ||
2844 | // } | ||
2845 | |||
2846 | |||
2837 | /// <summary> | 2847 | /// <summary> |
2838 | /// | 2848 | /// Send a full update to the client for the given part |
2839 | /// </summary> | 2849 | /// </summary> |
2840 | /// <param name="remoteClient"></param> | 2850 | /// <param name="remoteClient"></param> |
2841 | public void SendFullUpdate(IClientAPI remoteClient, uint clientFlags) | 2851 | /// <param name="clientFlags"></param> |
2852 | protected internal void SendFullUpdate(IClientAPI remoteClient, uint clientFlags) | ||
2842 | { | 2853 | { |
2843 | m_parentGroup.SendPartFullUpdate(remoteClient, this, clientFlags); | 2854 | // m_log.DebugFormat( |
2844 | } | 2855 | // "[SOG]: Sendinging part full update to {0} for {1} {2}", remoteClient.Name, part.Name, part.LocalId); |
2856 | |||
2857 | if (IsRoot) | ||
2858 | { | ||
2859 | if (IsAttachment) | ||
2860 | { | ||
2861 | SendFullUpdateToClient(remoteClient, AttachedPos, clientFlags); | ||
2862 | } | ||
2863 | else | ||
2864 | { | ||
2865 | SendFullUpdateToClient(remoteClient, AbsolutePosition, clientFlags); | ||
2866 | } | ||
2867 | } | ||
2868 | else | ||
2869 | { | ||
2870 | SendFullUpdateToClient(remoteClient, clientFlags); | ||
2871 | } | ||
2872 | } | ||
2845 | 2873 | ||
2846 | /// <summary> | 2874 | /// <summary> |
2847 | /// | 2875 | /// Send a full update for this part to all clients. |
2848 | /// </summary> | 2876 | /// </summary> |
2849 | public void SendFullUpdateToAllClients() | 2877 | public void SendFullUpdateToAllClients() |
2850 | { | 2878 | { |
2851 | ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); | 2879 | ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); |
2852 | for (int i = 0; i < avatars.Length; i++) | 2880 | for (int i = 0; i < avatars.Length; i++) |
2853 | { | 2881 | { |
2854 | // Ugly reference :( | 2882 | SendFullUpdate(avatars[i].ControllingClient, avatars[i].GenerateClientFlags(UUID)); |
2855 | m_parentGroup.SendPartFullUpdate(avatars[i].ControllingClient, this, | ||
2856 | avatars[i].GenerateClientFlags(UUID)); | ||
2857 | } | 2883 | } |
2858 | } | 2884 | } |
2859 | 2885 | ||
2886 | /// <summary> | ||
2887 | /// Send a full update to all clients except the one nominated. | ||
2888 | /// </summary> | ||
2889 | /// <param name="agentID"></param> | ||
2860 | public void SendFullUpdateToAllClientsExcept(UUID agentID) | 2890 | public void SendFullUpdateToAllClientsExcept(UUID agentID) |
2861 | { | 2891 | { |
2862 | ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); | 2892 | ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); |
@@ -2864,10 +2894,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2864 | { | 2894 | { |
2865 | // Ugly reference :( | 2895 | // Ugly reference :( |
2866 | if (avatars[i].UUID != agentID) | 2896 | if (avatars[i].UUID != agentID) |
2867 | { | 2897 | SendFullUpdate(avatars[i].ControllingClient, avatars[i].GenerateClientFlags(UUID)); |
2868 | m_parentGroup.SendPartFullUpdate(avatars[i].ControllingClient, this, | ||
2869 | avatars[i].GenerateClientFlags(UUID)); | ||
2870 | } | ||
2871 | } | 2898 | } |
2872 | } | 2899 | } |
2873 | 2900 | ||