aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs76
1 files changed, 34 insertions, 42 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index c5a6171..37b4fd6 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -417,8 +417,8 @@ namespace OpenSim.Region.Framework.Scenes
417 private List<SceneObjectPart> m_PlaySoundSlavePrims = new List<SceneObjectPart>(); 417 private List<SceneObjectPart> m_PlaySoundSlavePrims = new List<SceneObjectPart>();
418 public List<SceneObjectPart> PlaySoundSlavePrims 418 public List<SceneObjectPart> PlaySoundSlavePrims
419 { 419 {
420 get { return m_LoopSoundSlavePrims; } 420 get { return m_PlaySoundSlavePrims; }
421 set { m_LoopSoundSlavePrims = value; } 421 set { m_PlaySoundSlavePrims = value; }
422 } 422 }
423 423
424 private SceneObjectPart m_LoopSoundMasterPrim = null; 424 private SceneObjectPart m_LoopSoundMasterPrim = null;
@@ -567,8 +567,10 @@ namespace OpenSim.Region.Framework.Scenes
567 } 567 }
568 568
569 ApplyPhysics(m_scene.m_physicalPrim); 569 ApplyPhysics(m_scene.m_physicalPrim);
570 570
571 ScheduleGroupForFullUpdate(); 571 // Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled
572 // for the same object with very different properties. The caller must schedule the update.
573 //ScheduleGroupForFullUpdate();
572 } 574 }
573 575
574 public Vector3 GroupScale() 576 public Vector3 GroupScale()
@@ -956,10 +958,11 @@ namespace OpenSim.Region.Framework.Scenes
956 // don't attach attachments to child agents 958 // don't attach attachments to child agents
957 if (avatar.IsChildAgent) return; 959 if (avatar.IsChildAgent) return;
958 960
961// m_log.DebugFormat("[SOG]: Adding attachment {0} to avatar {1}", Name, avatar.Name);
962
959 DetachFromBackup(); 963 DetachFromBackup();
960 964
961 // Remove from database and parcel prim count 965 // Remove from database and parcel prim count
962 //
963 m_scene.DeleteFromStorage(UUID); 966 m_scene.DeleteFromStorage(UUID);
964 m_scene.EventManager.TriggerParcelPrimCountTainted(); 967 m_scene.EventManager.TriggerParcelPrimCountTainted();
965 968
@@ -985,7 +988,6 @@ namespace OpenSim.Region.Framework.Scenes
985 SetAttachmentPoint(Convert.ToByte(attachmentpoint)); 988 SetAttachmentPoint(Convert.ToByte(attachmentpoint));
986 989
987 avatar.AddAttachment(this); 990 avatar.AddAttachment(this);
988 m_log.Debug("[SOG]: Added attachment " + UUID + " to avatar " + avatar.UUID);
989 991
990 if (!silent) 992 if (!silent)
991 { 993 {
@@ -1002,6 +1004,12 @@ namespace OpenSim.Region.Framework.Scenes
1002 ScheduleGroupForFullUpdate(); 1004 ScheduleGroupForFullUpdate();
1003 } 1005 }
1004 } 1006 }
1007 else
1008 {
1009 m_log.WarnFormat(
1010 "[SOG]: Tried to add attachment {0} to avatar with UUID {1} in region {2} but the avatar is not present",
1011 UUID, agentID, Scene.RegionInfo.RegionName);
1012 }
1005 } 1013 }
1006 1014
1007 public byte GetAttachmentPoint() 1015 public byte GetAttachmentPoint()
@@ -1482,51 +1490,22 @@ namespace OpenSim.Region.Framework.Scenes
1482 1490
1483 #endregion 1491 #endregion
1484 1492
1485 #region Client Updating
1486
1487 public void SendFullUpdateToClient(IClientAPI remoteClient) 1493 public void SendFullUpdateToClient(IClientAPI remoteClient)
1488 { 1494 {
1489 SendPartFullUpdate(remoteClient, RootPart, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, RootPart.UUID)); 1495 RootPart.SendFullUpdate(
1496 remoteClient, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, RootPart.UUID));
1490 1497
1491 lock (m_parts) 1498 lock (m_parts)
1492 { 1499 {
1493 foreach (SceneObjectPart part in m_parts.Values) 1500 foreach (SceneObjectPart part in m_parts.Values)
1494 { 1501 {
1495 if (part != RootPart) 1502 if (part != RootPart)
1496 SendPartFullUpdate(remoteClient, part, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, part.UUID)); 1503 part.SendFullUpdate(
1497 } 1504 remoteClient, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, part.UUID));
1498 }
1499 }
1500
1501 /// <summary>
1502 /// Send a full update to the client for the given part
1503 /// </summary>
1504 /// <param name="remoteClient"></param>
1505 /// <param name="part"></param>
1506 internal void SendPartFullUpdate(IClientAPI remoteClient, SceneObjectPart part, uint clientFlags)
1507 {
1508// m_log.DebugFormat(
1509// "[SOG]: Sendinging part full update to {0} for {1} {2}", remoteClient.Name, part.Name, part.LocalId);
1510
1511 if (m_rootPart.UUID == part.UUID)
1512 {
1513 if (IsAttachment)
1514 {
1515 part.SendFullUpdateToClient(remoteClient, m_rootPart.AttachedPos, clientFlags);
1516 }
1517 else
1518 {
1519 part.SendFullUpdateToClient(remoteClient, AbsolutePosition, clientFlags);
1520 } 1505 }
1521 } 1506 }
1522 else
1523 {
1524 part.SendFullUpdateToClient(remoteClient, clientFlags);
1525 }
1526 } 1507 }
1527 1508
1528 #endregion
1529
1530 #region Copying 1509 #region Copying
1531 1510
1532 /// <summary> 1511 /// <summary>
@@ -1986,6 +1965,8 @@ namespace OpenSim.Region.Framework.Scenes
1986 1965
1987 public void ScheduleFullUpdateToAvatar(ScenePresence presence) 1966 public void ScheduleFullUpdateToAvatar(ScenePresence presence)
1988 { 1967 {
1968// m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1} just to avatar {2}", Name, UUID, presence.Name);
1969
1989 RootPart.AddFullUpdateToAvatar(presence); 1970 RootPart.AddFullUpdateToAvatar(presence);
1990 1971
1991 lock (m_parts) 1972 lock (m_parts)
@@ -2000,6 +1981,8 @@ namespace OpenSim.Region.Framework.Scenes
2000 1981
2001 public void ScheduleTerseUpdateToAvatar(ScenePresence presence) 1982 public void ScheduleTerseUpdateToAvatar(ScenePresence presence)
2002 { 1983 {
1984// m_log.DebugFormat("[SOG]: Scheduling terse update for {0} {1} just to avatar {2}", Name, UUID, presence.Name);
1985
2003 lock (m_parts) 1986 lock (m_parts)
2004 { 1987 {
2005 foreach (SceneObjectPart part in m_parts.Values) 1988 foreach (SceneObjectPart part in m_parts.Values)
@@ -2014,6 +1997,8 @@ namespace OpenSim.Region.Framework.Scenes
2014 /// </summary> 1997 /// </summary>
2015 public void ScheduleGroupForFullUpdate() 1998 public void ScheduleGroupForFullUpdate()
2016 { 1999 {
2000// m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, UUID);
2001
2017 checkAtTargets(); 2002 checkAtTargets();
2018 RootPart.ScheduleFullUpdate(); 2003 RootPart.ScheduleFullUpdate();
2019 2004
@@ -2032,6 +2017,8 @@ namespace OpenSim.Region.Framework.Scenes
2032 /// </summary> 2017 /// </summary>
2033 public void ScheduleGroupForTerseUpdate() 2018 public void ScheduleGroupForTerseUpdate()
2034 { 2019 {
2020// m_log.DebugFormat("[SOG]: Scheduling terse update for {0} {1}", Name, UUID);
2021
2035 lock (m_parts) 2022 lock (m_parts)
2036 { 2023 {
2037 foreach (SceneObjectPart part in m_parts.Values) 2024 foreach (SceneObjectPart part in m_parts.Values)
@@ -2045,9 +2032,11 @@ namespace OpenSim.Region.Framework.Scenes
2045 /// Immediately send a full update for this scene object. 2032 /// Immediately send a full update for this scene object.
2046 /// </summary> 2033 /// </summary>
2047 public void SendGroupFullUpdate() 2034 public void SendGroupFullUpdate()
2048 { 2035 {
2049 if (IsDeleted) 2036 if (IsDeleted)
2050 return; 2037 return;
2038
2039// m_log.DebugFormat("[SOG]: Sending immediate full group update for {0} {1}", Name, UUID);
2051 2040
2052 RootPart.SendFullUpdateToAllClients(); 2041 RootPart.SendFullUpdateToAllClients();
2053 2042
@@ -2064,7 +2053,7 @@ namespace OpenSim.Region.Framework.Scenes
2064 /// <summary> 2053 /// <summary>
2065 /// Immediately send an update for this scene object's root prim only. 2054 /// Immediately send an update for this scene object's root prim only.
2066 /// This is for updates regarding the object as a whole, and none of its parts in particular. 2055 /// This is for updates regarding the object as a whole, and none of its parts in particular.
2067 /// Note: this may not be cused by opensim (it probably should) but it's used by 2056 /// Note: this may not be used by opensim (it probably should) but it's used by
2068 /// external modules. 2057 /// external modules.
2069 /// </summary> 2058 /// </summary>
2070 public void SendGroupRootTerseUpdate() 2059 public void SendGroupRootTerseUpdate()
@@ -2079,6 +2068,7 @@ namespace OpenSim.Region.Framework.Scenes
2079 { 2068 {
2080 if (m_scene == null) // Need to check here as it's null during object creation 2069 if (m_scene == null) // Need to check here as it's null during object creation
2081 return; 2070 return;
2071
2082 m_scene.SceneGraph.AddToUpdateList(this); 2072 m_scene.SceneGraph.AddToUpdateList(this);
2083 } 2073 }
2084 2074
@@ -3557,7 +3547,9 @@ namespace OpenSim.Region.Framework.Scenes
3557 HasGroupChanged = true; 3547 HasGroupChanged = true;
3558 } 3548 }
3559 3549
3560 ScheduleGroupForFullUpdate(); 3550 // Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled
3551 // for the same object with very different properties. The caller must schedule the update.
3552 //ScheduleGroupForFullUpdate();
3561 } 3553 }
3562 3554
3563 public void TriggerScriptChangedEvent(Changed val) 3555 public void TriggerScriptChangedEvent(Changed val)