diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 68 |
1 files changed, 12 insertions, 56 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 4e1383c..f693b36 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1373,25 +1373,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1373 | // m_log.Debug("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString()); | 1373 | // m_log.Debug("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString()); |
1374 | } | 1374 | } |
1375 | 1375 | ||
1376 | /// <summary> | ||
1377 | /// Tell all scene presences that they should send updates for this part to their clients | ||
1378 | /// </summary> | ||
1379 | public void AddFullUpdateToAllAvatars() | ||
1380 | { | ||
1381 | ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) | ||
1382 | { | ||
1383 | AddFullUpdateToAvatar(avatar); | ||
1384 | }); | ||
1385 | } | ||
1386 | |||
1387 | /// <summary> | ||
1388 | /// Tell the scene presence that it should send updates for this part to its client | ||
1389 | /// </summary> | ||
1390 | public void AddFullUpdateToAvatar(ScenePresence presence) | ||
1391 | { | ||
1392 | presence.SceneViewer.QueuePartForUpdate(this); | ||
1393 | } | ||
1394 | |||
1395 | public void AddNewParticleSystem(Primitive.ParticleSystem pSystem) | 1376 | public void AddNewParticleSystem(Primitive.ParticleSystem pSystem) |
1396 | { | 1377 | { |
1397 | m_particleSystem = pSystem.GetBytes(); | 1378 | m_particleSystem = pSystem.GetBytes(); |
@@ -1402,20 +1383,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1402 | m_particleSystem = new byte[0]; | 1383 | m_particleSystem = new byte[0]; |
1403 | } | 1384 | } |
1404 | 1385 | ||
1405 | /// Terse updates | ||
1406 | public void AddTerseUpdateToAllAvatars() | ||
1407 | { | ||
1408 | ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) | ||
1409 | { | ||
1410 | AddTerseUpdateToAvatar(avatar); | ||
1411 | }); | ||
1412 | } | ||
1413 | |||
1414 | public void AddTerseUpdateToAvatar(ScenePresence presence) | ||
1415 | { | ||
1416 | presence.SceneViewer.QueuePartForUpdate(this); | ||
1417 | } | ||
1418 | |||
1419 | public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim) | 1386 | public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim) |
1420 | { | 1387 | { |
1421 | byte[] data = new byte[16]; | 1388 | byte[] data = new byte[16]; |
@@ -2650,8 +2617,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2650 | //ParentGroup.RootPart.m_groupPosition = newpos; | 2617 | //ParentGroup.RootPart.m_groupPosition = newpos; |
2651 | } | 2618 | } |
2652 | ScheduleTerseUpdate(); | 2619 | ScheduleTerseUpdate(); |
2653 | |||
2654 | //SendTerseUpdateToAllClients(); | ||
2655 | } | 2620 | } |
2656 | 2621 | ||
2657 | public void PreloadSound(string sound) | 2622 | public void PreloadSound(string sound) |
@@ -2834,6 +2799,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2834 | if (ParentGroup == null) | 2799 | if (ParentGroup == null) |
2835 | return; | 2800 | return; |
2836 | 2801 | ||
2802 | // This was pulled from SceneViewer. Attachments always receive full updates. | ||
2803 | // I could not verify if this is a requirement but this maintains existing behavior | ||
2804 | if (ParentGroup.IsAttachment) | ||
2805 | { | ||
2806 | ScheduleFullUpdate(); | ||
2807 | } | ||
2808 | |||
2837 | if (UpdateFlag == UpdateRequired.NONE) | 2809 | if (UpdateFlag == UpdateRequired.NONE) |
2838 | { | 2810 | { |
2839 | ParentGroup.HasGroupChanged = true; | 2811 | ParentGroup.HasGroupChanged = true; |
@@ -2928,23 +2900,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2928 | } | 2900 | } |
2929 | 2901 | ||
2930 | /// <summary> | 2902 | /// <summary> |
2931 | /// Send a full update to all clients except the one nominated. | ||
2932 | /// </summary> | ||
2933 | /// <param name="agentID"></param> | ||
2934 | public void SendFullUpdateToAllClientsExcept(UUID agentID) | ||
2935 | { | ||
2936 | if (ParentGroup == null) | ||
2937 | return; | ||
2938 | |||
2939 | ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) | ||
2940 | { | ||
2941 | // Ugly reference :( | ||
2942 | if (avatar.UUID != agentID) | ||
2943 | SendFullUpdate(avatar.ControllingClient, avatar.GenerateClientFlags(UUID)); | ||
2944 | }); | ||
2945 | } | ||
2946 | |||
2947 | /// <summary> | ||
2948 | /// Sends a full update to the client | 2903 | /// Sends a full update to the client |
2949 | /// </summary> | 2904 | /// </summary> |
2950 | /// <param name="remoteClient"></param> | 2905 | /// <param name="remoteClient"></param> |
@@ -3020,7 +2975,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3020 | !OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) || | 2975 | !OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) || |
3021 | Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) | 2976 | Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) |
3022 | { | 2977 | { |
3023 | AddTerseUpdateToAllAvatars(); | 2978 | |
2979 | SendTerseUpdateToAllClients(); | ||
3024 | ClearUpdateSchedule(); | 2980 | ClearUpdateSchedule(); |
3025 | 2981 | ||
3026 | // Update the "last" values | 2982 | // Update the "last" values |
@@ -3035,7 +2991,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3035 | } | 2991 | } |
3036 | case UpdateRequired.FULL: | 2992 | case UpdateRequired.FULL: |
3037 | { | 2993 | { |
3038 | AddFullUpdateToAllAvatars(); | 2994 | SendFullUpdateToAllClients(); |
3039 | break; | 2995 | break; |
3040 | } | 2996 | } |
3041 | } | 2997 | } |
@@ -3140,9 +3096,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3140 | /// </summary> | 3096 | /// </summary> |
3141 | public void SendTerseUpdateToAllClients() | 3097 | public void SendTerseUpdateToAllClients() |
3142 | { | 3098 | { |
3143 | ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) | 3099 | ParentGroup.Scene.ForEachClient(delegate(IClientAPI client) |
3144 | { | 3100 | { |
3145 | SendTerseUpdateToClient(avatar.ControllingClient); | 3101 | SendTerseUpdateToClient(client); |
3146 | }); | 3102 | }); |
3147 | } | 3103 | } |
3148 | 3104 | ||