aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorMelanie2011-11-14 20:34:49 +0000
committerMelanie2011-11-14 20:34:49 +0000
commitdf35720cf58e9e408e1c7bc2526b169a1af84d9d (patch)
tree26ceae4ea3e0f32de16eef26c306053523534d31 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentFix build break (diff)
parentMerge branch 'remove-scene-viewer' (diff)
downloadopensim-SC_OLD-df35720cf58e9e408e1c7bc2526b169a1af84d9d.zip
opensim-SC_OLD-df35720cf58e9e408e1c7bc2526b169a1af84d9d.tar.gz
opensim-SC_OLD-df35720cf58e9e408e1c7bc2526b169a1af84d9d.tar.bz2
opensim-SC_OLD-df35720cf58e9e408e1c7bc2526b169a1af84d9d.tar.xz
Merge branch 'master' into bigmerge
Conflicts: OpenSim/Region/Framework/Scenes/SceneViewer.cs
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs68
1 files changed, 12 insertions, 56 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 7025551..45ca0b7 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1425,25 +1425,6 @@ namespace OpenSim.Region.Framework.Scenes
1425 // m_log.Debug("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString()); 1425 // m_log.Debug("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString());
1426 } 1426 }
1427 1427
1428 /// <summary>
1429 /// Tell all scene presences that they should send updates for this part to their clients
1430 /// </summary>
1431 public void AddFullUpdateToAllAvatars()
1432 {
1433 ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
1434 {
1435 AddFullUpdateToAvatar(avatar);
1436 });
1437 }
1438
1439 /// <summary>
1440 /// Tell the scene presence that it should send updates for this part to its client
1441 /// </summary>
1442 public void AddFullUpdateToAvatar(ScenePresence presence)
1443 {
1444 presence.SceneViewer.QueuePartForUpdate(this);
1445 }
1446
1447 public void AddNewParticleSystem(Primitive.ParticleSystem pSystem) 1428 public void AddNewParticleSystem(Primitive.ParticleSystem pSystem)
1448 { 1429 {
1449 m_particleSystem = pSystem.GetBytes(); 1430 m_particleSystem = pSystem.GetBytes();
@@ -1454,20 +1435,6 @@ namespace OpenSim.Region.Framework.Scenes
1454 m_particleSystem = new byte[0]; 1435 m_particleSystem = new byte[0];
1455 } 1436 }
1456 1437
1457 /// Terse updates
1458 public void AddTerseUpdateToAllAvatars()
1459 {
1460 ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
1461 {
1462 AddTerseUpdateToAvatar(avatar);
1463 });
1464 }
1465
1466 public void AddTerseUpdateToAvatar(ScenePresence presence)
1467 {
1468 presence.SceneViewer.QueuePartForUpdate(this);
1469 }
1470
1471 public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim) 1438 public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim)
1472 { 1439 {
1473 byte[] data = new byte[16]; 1440 byte[] data = new byte[16];
@@ -2703,8 +2670,6 @@ namespace OpenSim.Region.Framework.Scenes
2703 //ParentGroup.RootPart.m_groupPosition = newpos; 2670 //ParentGroup.RootPart.m_groupPosition = newpos;
2704 } 2671 }
2705 ScheduleTerseUpdate(); 2672 ScheduleTerseUpdate();
2706
2707 //SendTerseUpdateToAllClients();
2708 } 2673 }
2709 2674
2710 public void PreloadSound(string sound) 2675 public void PreloadSound(string sound)
@@ -2888,6 +2853,13 @@ namespace OpenSim.Region.Framework.Scenes
2888 if (ParentGroup == null) 2853 if (ParentGroup == null)
2889 return; 2854 return;
2890 2855
2856 // This was pulled from SceneViewer. Attachments always receive full updates.
2857 // I could not verify if this is a requirement but this maintains existing behavior
2858 if (ParentGroup.IsAttachment)
2859 {
2860 ScheduleFullUpdate();
2861 }
2862
2891 if (UpdateFlag == UpdateRequired.NONE) 2863 if (UpdateFlag == UpdateRequired.NONE)
2892 { 2864 {
2893 ParentGroup.HasGroupChanged = true; 2865 ParentGroup.HasGroupChanged = true;
@@ -2982,23 +2954,6 @@ namespace OpenSim.Region.Framework.Scenes
2982 } 2954 }
2983 2955
2984 /// <summary> 2956 /// <summary>
2985 /// Send a full update to all clients except the one nominated.
2986 /// </summary>
2987 /// <param name="agentID"></param>
2988 public void SendFullUpdateToAllClientsExcept(UUID agentID)
2989 {
2990 if (ParentGroup == null)
2991 return;
2992
2993 ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
2994 {
2995 // Ugly reference :(
2996 if (avatar.UUID != agentID)
2997 SendFullUpdate(avatar.ControllingClient, avatar.GenerateClientFlags(UUID));
2998 });
2999 }
3000
3001 /// <summary>
3002 /// Sends a full update to the client 2957 /// Sends a full update to the client
3003 /// </summary> 2958 /// </summary>
3004 /// <param name="remoteClient"></param> 2959 /// <param name="remoteClient"></param>
@@ -3074,7 +3029,8 @@ namespace OpenSim.Region.Framework.Scenes
3074 !OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) || 3029 !OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
3075 Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) 3030 Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
3076 { 3031 {
3077 AddTerseUpdateToAllAvatars(); 3032
3033 SendTerseUpdateToAllClients();
3078 ClearUpdateSchedule(); 3034 ClearUpdateSchedule();
3079 3035
3080 // Update the "last" values 3036 // Update the "last" values
@@ -3089,7 +3045,7 @@ namespace OpenSim.Region.Framework.Scenes
3089 } 3045 }
3090 case UpdateRequired.FULL: 3046 case UpdateRequired.FULL:
3091 { 3047 {
3092 AddFullUpdateToAllAvatars(); 3048 SendFullUpdateToAllClients();
3093 break; 3049 break;
3094 } 3050 }
3095 } 3051 }
@@ -3193,9 +3149,9 @@ namespace OpenSim.Region.Framework.Scenes
3193 /// </summary> 3149 /// </summary>
3194 public void SendTerseUpdateToAllClients() 3150 public void SendTerseUpdateToAllClients()
3195 { 3151 {
3196 ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) 3152 ParentGroup.Scene.ForEachClient(delegate(IClientAPI client)
3197 { 3153 {
3198 SendTerseUpdateToClient(avatar.ControllingClient); 3154 SendTerseUpdateToClient(client);
3199 }); 3155 });
3200 } 3156 }
3201 3157