aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs59
1 files changed, 47 insertions, 12 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 548a64f..9862785 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1270,16 +1270,17 @@ namespace OpenSim.Region.Framework.Scenes
1270 /// Tell all scene presences that they should send updates for this part to their clients 1270 /// Tell all scene presences that they should send updates for this part to their clients
1271 /// </summary> 1271 /// </summary>
1272 public void AddFullUpdateToAllAvatars() 1272 public void AddFullUpdateToAllAvatars()
1273 { 1273 {
1274 ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); 1274 ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences();
1275 for (int i = 0; i < avatars.Length; i++) 1275 for (int i = 0; i < avatars.Length; i++)
1276 { 1276 AddFullUpdateToAvatar(avatars[i]);
1277 avatars[i].SceneViewer.QueuePartForUpdate(this);
1278 }
1279 } 1277 }
1280 1278
1281 public void AddFullUpdateToAvatar(ScenePresence presence) 1279 public void AddFullUpdateToAvatar(ScenePresence presence)
1282 { 1280 {
1281// if (IsAttachment)
1282// m_log.DebugFormat("AddFullUpdateToAllAvatar() {0} for {1} {2}", presence.Name, Name, LocalId);
1283
1283 presence.SceneViewer.QueuePartForUpdate(this); 1284 presence.SceneViewer.QueuePartForUpdate(this);
1284 } 1285 }
1285 1286
@@ -1298,13 +1299,14 @@ namespace OpenSim.Region.Framework.Scenes
1298 { 1299 {
1299 ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); 1300 ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences();
1300 for (int i = 0; i < avatars.Length; i++) 1301 for (int i = 0; i < avatars.Length; i++)
1301 { 1302 AddTerseUpdateToAvatar(avatars[i]);
1302 avatars[i].SceneViewer.QueuePartForUpdate(this);
1303 }
1304 } 1303 }
1305 1304
1306 public void AddTerseUpdateToAvatar(ScenePresence presence) 1305 public void AddTerseUpdateToAvatar(ScenePresence presence)
1307 { 1306 {
1307// if (IsAttachment)
1308// m_log.DebugFormat("AddTerseUpdateToAvatar() {0} for {1} {2}", presence.Name, Name, LocalId);
1309
1308 presence.SceneViewer.QueuePartForUpdate(this); 1310 presence.SceneViewer.QueuePartForUpdate(this);
1309 } 1311 }
1310 1312
@@ -2713,7 +2715,8 @@ namespace OpenSim.Region.Framework.Scenes
2713 /// </summary> 2715 /// </summary>
2714 public void ScheduleFullUpdate() 2716 public void ScheduleFullUpdate()
2715 { 2717 {
2716// m_log.DebugFormat("[SCENE OBJECT PART]: Scheduling full update for {0} {1}", Name, LocalId); 2718// if (IsAttachment)
2719// m_log.DebugFormat("[SOP]: Scheduling full update for {0} {1}", Name, LocalId);
2717 2720
2718 if (m_parentGroup != null) 2721 if (m_parentGroup != null)
2719 { 2722 {
@@ -2826,6 +2829,10 @@ namespace OpenSim.Region.Framework.Scenes
2826 /// <param name="remoteClient"></param> 2829 /// <param name="remoteClient"></param>
2827 public void SendFullUpdate(IClientAPI remoteClient, uint clientFlags) 2830 public void SendFullUpdate(IClientAPI remoteClient, uint clientFlags)
2828 { 2831 {
2832// if (IsAttachment)
2833// m_log.DebugFormat(
2834// "[SCENE OBJECT PART]: Sending part full update to {0} for {1} {2}", remoteClient.Name, Name, LocalId);
2835
2829 m_parentGroup.SendPartFullUpdate(remoteClient, this, clientFlags); 2836 m_parentGroup.SendPartFullUpdate(remoteClient, this, clientFlags);
2830 } 2837 }
2831 2838
@@ -2834,6 +2841,10 @@ namespace OpenSim.Region.Framework.Scenes
2834 /// </summary> 2841 /// </summary>
2835 public void SendFullUpdateToAllClients() 2842 public void SendFullUpdateToAllClients()
2836 { 2843 {
2844// if (IsAttachment)
2845// m_log.DebugFormat(
2846// "[SCENE OBJECT PART]: Sending full update for {0} {1} for all clients", Name, LocalId);
2847
2837 ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); 2848 ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences();
2838 for (int i = 0; i < avatars.Length; i++) 2849 for (int i = 0; i < avatars.Length; i++)
2839 { 2850 {
@@ -2845,6 +2856,10 @@ namespace OpenSim.Region.Framework.Scenes
2845 2856
2846 public void SendFullUpdateToAllClientsExcept(UUID agentID) 2857 public void SendFullUpdateToAllClientsExcept(UUID agentID)
2847 { 2858 {
2859// if (IsAttachment)
2860// m_log.DebugFormat(
2861// "[SCENE OBJECT PART]: Sending full update for {0} {1} to all clients except {2}", Name, LocalId, agentID);
2862
2848 ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); 2863 ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences();
2849 for (int i = 0; i < avatars.Length; i++) 2864 for (int i = 0; i < avatars.Length; i++)
2850 { 2865 {
@@ -2900,10 +2915,27 @@ namespace OpenSim.Region.Framework.Scenes
2900 //isattachment = ParentGroup.RootPart.IsAttachment; 2915 //isattachment = ParentGroup.RootPart.IsAttachment;
2901 2916
2902 byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A}; 2917 byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A};
2903 remoteClient.SendPrimitiveToClient(new SendPrimitiveData(m_regionHandle, m_parentGroup.GetTimeDilation(), LocalId, m_shape, 2918
2904 lPos, Velocity, Acceleration, RotationOffset, AngularVelocity, clientFlags, m_uuid, _ownerID, 2919 double priority = ParentGroup.GetUpdatePriority(remoteClient);
2905 m_text, color, _parentID, m_particleSystem, m_clickAction, (byte)m_material, m_TextureAnimation, IsAttachment, 2920 if (IsRoot && IsAttachment)
2906 AttachmentPoint,FromItemID, Sound, SoundGain, SoundFlags, SoundRadius, ParentGroup.GetUpdatePriority(remoteClient))); 2921 {
2922 if (double.MinValue == priority)
2923 {
2924 m_log.WarnFormat(
2925 "[SOP]: Couldn't raise update priority of root part for attachment {0} {1} because priority is already highest value",
2926 Name, LocalId);
2927 }
2928 else
2929 {
2930 priority = double.MinValue;
2931 }
2932 }
2933
2934 remoteClient.SendPrimitiveToClient(
2935 new SendPrimitiveData(m_regionHandle, m_parentGroup.GetTimeDilation(), LocalId, m_shape,
2936 lPos, Velocity, Acceleration, RotationOffset, AngularVelocity, clientFlags, m_uuid, _ownerID,
2937 m_text, color, _parentID, m_particleSystem, m_clickAction, (byte)m_material, m_TextureAnimation, IsAttachment,
2938 AttachmentPoint,FromItemID, Sound, SoundGain, SoundFlags, SoundRadius, priority));
2907 } 2939 }
2908 2940
2909 /// <summary> 2941 /// <summary>
@@ -2953,6 +2985,9 @@ namespace OpenSim.Region.Framework.Scenes
2953 { 2985 {
2954 if (m_updateFlag == 2) // is a new prim, just created/reloaded or has major changes 2986 if (m_updateFlag == 2) // is a new prim, just created/reloaded or has major changes
2955 { 2987 {
2988// if (IsAttachment)
2989// m_log.DebugFormat("[SOP]: Sending scheduled full update for {0} {1}", Name, LocalId);
2990
2956 AddFullUpdateToAllAvatars(); 2991 AddFullUpdateToAllAvatars();
2957 m_updateFlag = 0; //Same here 2992 m_updateFlag = 0; //Same here
2958 } 2993 }