aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-05-27 21:35:17 +0100
committerJustin Clark-Casey (justincc)2010-06-07 19:14:22 +0100
commit50ddb20204e8eb513212fe80d80b1308280fd47f (patch)
treef58c4ccd06a5f57985869f4679e3b208f59db912 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentRevert "commit code which stops full updates being fired multiple times when ... (diff)
downloadopensim-SC_OLD-50ddb20204e8eb513212fe80d80b1308280fd47f.zip
opensim-SC_OLD-50ddb20204e8eb513212fe80d80b1308280fd47f.tar.gz
opensim-SC_OLD-50ddb20204e8eb513212fe80d80b1308280fd47f.tar.bz2
opensim-SC_OLD-50ddb20204e8eb513212fe80d80b1308280fd47f.tar.xz
commit code which stops full updates being fired multiple times when attachments cross standalone region boundaries
lots of messy debug code here too which would need to be removed
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs34
1 files changed, 26 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index a85a4b3..ffbb427 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1259,16 +1259,17 @@ namespace OpenSim.Region.Framework.Scenes
1259 /// Tell all scene presences that they should send updates for this part to their clients 1259 /// Tell all scene presences that they should send updates for this part to their clients
1260 /// </summary> 1260 /// </summary>
1261 public void AddFullUpdateToAllAvatars() 1261 public void AddFullUpdateToAllAvatars()
1262 { 1262 {
1263 ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); 1263 ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences();
1264 for (int i = 0; i < avatars.Length; i++) 1264 for (int i = 0; i < avatars.Length; i++)
1265 { 1265 AddFullUpdateToAvatar(avatars[i]);
1266 avatars[i].SceneViewer.QueuePartForUpdate(this);
1267 }
1268 } 1266 }
1269 1267
1270 public void AddFullUpdateToAvatar(ScenePresence presence) 1268 public void AddFullUpdateToAvatar(ScenePresence presence)
1271 { 1269 {
1270 if (IsAttachment)
1271 m_log.DebugFormat("AddFullUpdateToAllAvatar() {0} for {1} {2}", presence.Name, Name, LocalId);
1272
1272 presence.SceneViewer.QueuePartForUpdate(this); 1273 presence.SceneViewer.QueuePartForUpdate(this);
1273 } 1274 }
1274 1275
@@ -1287,13 +1288,14 @@ namespace OpenSim.Region.Framework.Scenes
1287 { 1288 {
1288 ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); 1289 ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences();
1289 for (int i = 0; i < avatars.Length; i++) 1290 for (int i = 0; i < avatars.Length; i++)
1290 { 1291 AddTerseUpdateToAvatar(avatars[i]);
1291 avatars[i].SceneViewer.QueuePartForUpdate(this);
1292 }
1293 } 1292 }
1294 1293
1295 public void AddTerseUpdateToAvatar(ScenePresence presence) 1294 public void AddTerseUpdateToAvatar(ScenePresence presence)
1296 { 1295 {
1296 if (IsAttachment)
1297 m_log.DebugFormat("AddTerseUpdateToAvatar() {0} for {1} {2}", presence.Name, Name, LocalId);
1298
1297 presence.SceneViewer.QueuePartForUpdate(this); 1299 presence.SceneViewer.QueuePartForUpdate(this);
1298 } 1300 }
1299 1301
@@ -2727,7 +2729,8 @@ namespace OpenSim.Region.Framework.Scenes
2727 /// </summary> 2729 /// </summary>
2728 public void ScheduleFullUpdate() 2730 public void ScheduleFullUpdate()
2729 { 2731 {
2730// m_log.DebugFormat("[SCENE OBJECT PART]: Scheduling full update for {0} {1}", Name, LocalId); 2732 if (IsAttachment)
2733 m_log.DebugFormat("[SOP]: Scheduling full update for {0} {1}", Name, LocalId);
2731 2734
2732 if (m_parentGroup != null) 2735 if (m_parentGroup != null)
2733 { 2736 {
@@ -2840,6 +2843,10 @@ namespace OpenSim.Region.Framework.Scenes
2840 /// <param name="remoteClient"></param> 2843 /// <param name="remoteClient"></param>
2841 public void SendFullUpdate(IClientAPI remoteClient, uint clientFlags) 2844 public void SendFullUpdate(IClientAPI remoteClient, uint clientFlags)
2842 { 2845 {
2846 if (IsAttachment)
2847 m_log.DebugFormat(
2848 "[SCENE OBJECT PART]: Sending part full update to {0} for {1} {2}", remoteClient.Name, Name, LocalId);
2849
2843 m_parentGroup.SendPartFullUpdate(remoteClient, this, clientFlags); 2850 m_parentGroup.SendPartFullUpdate(remoteClient, this, clientFlags);
2844 } 2851 }
2845 2852
@@ -2848,6 +2855,10 @@ namespace OpenSim.Region.Framework.Scenes
2848 /// </summary> 2855 /// </summary>
2849 public void SendFullUpdateToAllClients() 2856 public void SendFullUpdateToAllClients()
2850 { 2857 {
2858 if (IsAttachment)
2859 m_log.DebugFormat(
2860 "[SCENE OBJECT PART]: Sending full update for {0} {1} for all clients", Name, LocalId);
2861
2851 ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); 2862 ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences();
2852 for (int i = 0; i < avatars.Length; i++) 2863 for (int i = 0; i < avatars.Length; i++)
2853 { 2864 {
@@ -2859,6 +2870,10 @@ namespace OpenSim.Region.Framework.Scenes
2859 2870
2860 public void SendFullUpdateToAllClientsExcept(UUID agentID) 2871 public void SendFullUpdateToAllClientsExcept(UUID agentID)
2861 { 2872 {
2873 if (IsAttachment)
2874 m_log.DebugFormat(
2875 "[SCENE OBJECT PART]: Sending full update for {0} {1} to all clients except {2}", Name, LocalId, agentID);
2876
2862 ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); 2877 ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences();
2863 for (int i = 0; i < avatars.Length; i++) 2878 for (int i = 0; i < avatars.Length; i++)
2864 { 2879 {
@@ -2965,6 +2980,9 @@ namespace OpenSim.Region.Framework.Scenes
2965 { 2980 {
2966 if (m_updateFlag == 2) // is a new prim, just created/reloaded or has major changes 2981 if (m_updateFlag == 2) // is a new prim, just created/reloaded or has major changes
2967 { 2982 {
2983 if (IsAttachment)
2984 m_log.DebugFormat("[SOP]: Sending scheduled full update for {0} {1}", Name, LocalId);
2985
2968 AddFullUpdateToAllAvatars(); 2986 AddFullUpdateToAllAvatars();
2969 ClearUpdateSchedule(); 2987 ClearUpdateSchedule();
2970 } 2988 }