aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-07 05:48:44 +0000
committerMelanie Thielker2008-11-07 05:48:44 +0000
commit48c6d052d94a7ab57c5264f09e989fa717c730f5 (patch)
tree2af23487a496bc60c0ca3839783e57bfac1ce3de /OpenSim/Region/Environment/Scenes/Scene.cs
parent* Fix half of the issue behind the long standing 'UseCircuitCode' packet spam... (diff)
downloadopensim-SC-48c6d052d94a7ab57c5264f09e989fa717c730f5.zip
opensim-SC-48c6d052d94a7ab57c5264f09e989fa717c730f5.tar.gz
opensim-SC-48c6d052d94a7ab57c5264f09e989fa717c730f5.tar.bz2
opensim-SC-48c6d052d94a7ab57c5264f09e989fa717c730f5.tar.xz
Attachments, attachments, and, did I say attachments?
Too many fixes to list.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs25
1 files changed, 14 insertions, 11 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index cee183c..40f8605 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1831,7 +1831,7 @@ namespace OpenSim.Region.Environment.Scenes
1831 foreach (EntityBase e in entities) 1831 foreach (EntityBase e in entities)
1832 { 1832 {
1833 if (e is SceneObjectGroup) 1833 if (e is SceneObjectGroup)
1834 DeleteSceneObject((SceneObjectGroup)e); 1834 DeleteSceneObject((SceneObjectGroup)e, false);
1835 } 1835 }
1836 } 1836 }
1837 } 1837 }
@@ -1840,7 +1840,7 @@ namespace OpenSim.Region.Environment.Scenes
1840 /// Delete the given object from the scene. 1840 /// Delete the given object from the scene.
1841 /// </summary> 1841 /// </summary>
1842 /// <param name="group"></param> 1842 /// <param name="group"></param>
1843 public void DeleteSceneObject(SceneObjectGroup group) 1843 public void DeleteSceneObject(SceneObjectGroup group, bool silent)
1844 { 1844 {
1845 //SceneObjectPart rootPart = group.GetChildPart(group.UUID); 1845 //SceneObjectPart rootPart = group.GetChildPart(group.UUID);
1846 1846
@@ -1866,7 +1866,7 @@ namespace OpenSim.Region.Environment.Scenes
1866 EventManager.TriggerParcelPrimCountTainted(); 1866 EventManager.TriggerParcelPrimCountTainted();
1867 } 1867 }
1868 1868
1869 group.DeleteGroup(); 1869 group.DeleteGroup(silent);
1870 } 1870 }
1871 1871
1872 /// <summary> 1872 /// <summary>
@@ -1982,7 +1982,7 @@ namespace OpenSim.Region.Environment.Scenes
1982 /// </summary> 1982 /// </summary>
1983 /// <param name="attemptedPosition">the attempted out of region position of the scene object</param> 1983 /// <param name="attemptedPosition">the attempted out of region position of the scene object</param>
1984 /// <param name="grp">the scene object that we're crossing</param> 1984 /// <param name="grp">the scene object that we're crossing</param>
1985 public void CrossPrimGroupIntoNewRegion(Vector3 attemptedPosition, SceneObjectGroup grp) 1985 public void CrossPrimGroupIntoNewRegion(Vector3 attemptedPosition, SceneObjectGroup grp, bool silent)
1986 { 1986 {
1987 if (grp == null) 1987 if (grp == null)
1988 return; 1988 return;
@@ -1994,7 +1994,7 @@ namespace OpenSim.Region.Environment.Scenes
1994 // We remove the object here 1994 // We remove the object here
1995 try 1995 try
1996 { 1996 {
1997 DeleteSceneObject(grp); 1997 DeleteSceneObject(grp, false);
1998 } 1998 }
1999 catch (Exception) 1999 catch (Exception)
2000 { 2000 {
@@ -2044,7 +2044,7 @@ namespace OpenSim.Region.Environment.Scenes
2044 grp.OffsetForNewRegion(pos); 2044 grp.OffsetForNewRegion(pos);
2045 2045
2046 // If we fail to cross the border, then reset the position of the scene object on that border. 2046 // If we fail to cross the border, then reset the position of the scene object on that border.
2047 if (!CrossPrimGroupIntoNewRegion(newRegionHandle, grp)) 2047 if (!CrossPrimGroupIntoNewRegion(newRegionHandle, grp, silent))
2048 { 2048 {
2049 grp.OffsetForNewRegion(oldGroupPosition); 2049 grp.OffsetForNewRegion(oldGroupPosition);
2050 } 2050 }
@@ -2059,7 +2059,7 @@ namespace OpenSim.Region.Environment.Scenes
2059 /// true if the crossing itself was successful, false on failure 2059 /// true if the crossing itself was successful, false on failure
2060 /// FIMXE: we still return true if the crossing object was not successfully deleted from the originating region 2060 /// FIMXE: we still return true if the crossing object was not successfully deleted from the originating region
2061 /// </returns> 2061 /// </returns>
2062 public bool CrossPrimGroupIntoNewRegion(ulong newRegionHandle, SceneObjectGroup grp) 2062 public bool CrossPrimGroupIntoNewRegion(ulong newRegionHandle, SceneObjectGroup grp, bool silent)
2063 { 2063 {
2064 bool successYN = false; 2064 bool successYN = false;
2065 int primcrossingXMLmethod = 0; 2065 int primcrossingXMLmethod = 0;
@@ -2075,7 +2075,7 @@ namespace OpenSim.Region.Environment.Scenes
2075 // We remove the object here 2075 // We remove the object here
2076 try 2076 try
2077 { 2077 {
2078 DeleteSceneObject(grp); 2078 DeleteSceneObject(grp, silent);
2079 } 2079 }
2080 catch (Exception e) 2080 catch (Exception e)
2081 { 2081 {
@@ -2115,7 +2115,7 @@ namespace OpenSim.Region.Environment.Scenes
2115 /// <returns></returns> 2115 /// <returns></returns>
2116 public bool IncomingInterRegionPrimGroup(ulong regionHandle, UUID primID, string objXMLData, int XMLMethod) 2116 public bool IncomingInterRegionPrimGroup(ulong regionHandle, UUID primID, string objXMLData, int XMLMethod)
2117 { 2117 {
2118 m_log.Warn("{[INTERREGION]: A new prim arrived from a neighbor"); 2118 m_log.Warn("[INTERREGION]: A new prim arrived from a neighbor");
2119 if (XMLMethod == 0) 2119 if (XMLMethod == 0)
2120 { 2120 {
2121 SceneObjectGroup sceneObject = m_serialiser.DeserializeGroupFromXml2(objXMLData); 2121 SceneObjectGroup sceneObject = m_serialiser.DeserializeGroupFromXml2(objXMLData);
@@ -2129,7 +2129,7 @@ namespace OpenSim.Region.Environment.Scenes
2129 SceneObjectGroup grp = RootPrim.ParentGroup; 2129 SceneObjectGroup grp = RootPrim.ParentGroup;
2130 if (grp != null) 2130 if (grp != null)
2131 { 2131 {
2132 DeleteSceneObject(grp); 2132 DeleteSceneObject(grp, false);
2133 } 2133 }
2134 2134
2135 m_log.Info("[INTERREGION]: Denied prim crossing for banned avatar"); 2135 m_log.Info("[INTERREGION]: Denied prim crossing for banned avatar");
@@ -2145,6 +2145,8 @@ namespace OpenSim.Region.Environment.Scenes
2145 { 2145 {
2146 // Never persist 2146 // Never persist
2147 2147
2148 m_log.DebugFormat("[ATTACHMENT]: Received attachment {0}, inworld asset id {1}", grp.RootPart.LastOwnerID.ToString(), grp.UUID.ToString());
2149
2148 grp.DetachFromBackup(); 2150 grp.DetachFromBackup();
2149 2151
2150 // Attachment 2152 // Attachment
@@ -2156,6 +2158,7 @@ namespace OpenSim.Region.Environment.Scenes
2156 // with the deeded object, it goes back to them 2158 // with the deeded object, it goes back to them
2157 2159
2158 grp.SetFromAssetID(grp.RootPart.LastOwnerID); 2160 grp.SetFromAssetID(grp.RootPart.LastOwnerID);
2161 m_log.DebugFormat("[ATTACHMENT]: Attach to avatar {0}", sp.UUID.ToString());
2159 AttachObject(sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition); 2162 AttachObject(sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition);
2160 } 2163 }
2161 else 2164 else
@@ -4354,7 +4357,7 @@ namespace OpenSim.Region.Environment.Scenes
4354 if ((grp.RootPart.Flags & PrimFlags.TemporaryOnRez) != 0) 4357 if ((grp.RootPart.Flags & PrimFlags.TemporaryOnRez) != 0)
4355 { 4358 {
4356 if (grp.RootPart.Expires <= DateTime.Now) 4359 if (grp.RootPart.Expires <= DateTime.Now)
4357 DeleteSceneObject(grp); 4360 DeleteSceneObject(grp, false);
4358 } 4361 }
4359 } 4362 }
4360 } 4363 }