diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index c5a6171..c14b39a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -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() |
@@ -1986,6 +1994,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1986 | 1994 | ||
1987 | public void ScheduleFullUpdateToAvatar(ScenePresence presence) | 1995 | public void ScheduleFullUpdateToAvatar(ScenePresence presence) |
1988 | { | 1996 | { |
1997 | // m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1} just to avatar {2}", Name, UUID, presence.Name); | ||
1998 | |||
1989 | RootPart.AddFullUpdateToAvatar(presence); | 1999 | RootPart.AddFullUpdateToAvatar(presence); |
1990 | 2000 | ||
1991 | lock (m_parts) | 2001 | lock (m_parts) |
@@ -2000,6 +2010,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2000 | 2010 | ||
2001 | public void ScheduleTerseUpdateToAvatar(ScenePresence presence) | 2011 | public void ScheduleTerseUpdateToAvatar(ScenePresence presence) |
2002 | { | 2012 | { |
2013 | // m_log.DebugFormat("[SOG]: Scheduling terse update for {0} {1} just to avatar {2}", Name, UUID, presence.Name); | ||
2014 | |||
2003 | lock (m_parts) | 2015 | lock (m_parts) |
2004 | { | 2016 | { |
2005 | foreach (SceneObjectPart part in m_parts.Values) | 2017 | foreach (SceneObjectPart part in m_parts.Values) |
@@ -2014,6 +2026,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2014 | /// </summary> | 2026 | /// </summary> |
2015 | public void ScheduleGroupForFullUpdate() | 2027 | public void ScheduleGroupForFullUpdate() |
2016 | { | 2028 | { |
2029 | // m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, UUID); | ||
2030 | |||
2017 | checkAtTargets(); | 2031 | checkAtTargets(); |
2018 | RootPart.ScheduleFullUpdate(); | 2032 | RootPart.ScheduleFullUpdate(); |
2019 | 2033 | ||
@@ -2032,6 +2046,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2032 | /// </summary> | 2046 | /// </summary> |
2033 | public void ScheduleGroupForTerseUpdate() | 2047 | public void ScheduleGroupForTerseUpdate() |
2034 | { | 2048 | { |
2049 | // m_log.DebugFormat("[SOG]: Scheduling terse update for {0} {1}", Name, UUID); | ||
2050 | |||
2035 | lock (m_parts) | 2051 | lock (m_parts) |
2036 | { | 2052 | { |
2037 | foreach (SceneObjectPart part in m_parts.Values) | 2053 | foreach (SceneObjectPart part in m_parts.Values) |
@@ -2045,9 +2061,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2045 | /// Immediately send a full update for this scene object. | 2061 | /// Immediately send a full update for this scene object. |
2046 | /// </summary> | 2062 | /// </summary> |
2047 | public void SendGroupFullUpdate() | 2063 | public void SendGroupFullUpdate() |
2048 | { | 2064 | { |
2049 | if (IsDeleted) | 2065 | if (IsDeleted) |
2050 | return; | 2066 | return; |
2067 | |||
2068 | // m_log.DebugFormat("[SOG]: Sending immediate full group update for {0} {1}", Name, UUID); | ||
2051 | 2069 | ||
2052 | RootPart.SendFullUpdateToAllClients(); | 2070 | RootPart.SendFullUpdateToAllClients(); |
2053 | 2071 | ||
@@ -2064,7 +2082,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2064 | /// <summary> | 2082 | /// <summary> |
2065 | /// Immediately send an update for this scene object's root prim only. | 2083 | /// 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. | 2084 | /// 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 | 2085 | /// Note: this may not be used by opensim (it probably should) but it's used by |
2068 | /// external modules. | 2086 | /// external modules. |
2069 | /// </summary> | 2087 | /// </summary> |
2070 | public void SendGroupRootTerseUpdate() | 2088 | public void SendGroupRootTerseUpdate() |
@@ -2079,6 +2097,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2079 | { | 2097 | { |
2080 | if (m_scene == null) // Need to check here as it's null during object creation | 2098 | if (m_scene == null) // Need to check here as it's null during object creation |
2081 | return; | 2099 | return; |
2100 | |||
2082 | m_scene.SceneGraph.AddToUpdateList(this); | 2101 | m_scene.SceneGraph.AddToUpdateList(this); |
2083 | } | 2102 | } |
2084 | 2103 | ||
@@ -3557,7 +3576,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3557 | HasGroupChanged = true; | 3576 | HasGroupChanged = true; |
3558 | } | 3577 | } |
3559 | 3578 | ||
3560 | ScheduleGroupForFullUpdate(); | 3579 | // Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled |
3580 | // for the same object with very different properties. The caller must schedule the update. | ||
3581 | //ScheduleGroupForFullUpdate(); | ||
3561 | } | 3582 | } |
3562 | 3583 | ||
3563 | public void TriggerScriptChangedEvent(Changed val) | 3584 | public void TriggerScriptChangedEvent(Changed val) |