diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index a49ed13..49a3485 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1962,6 +1962,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1962 | /// <summary> | 1962 | /// <summary> |
1963 | /// Link the prims in a given group to this group | 1963 | /// Link the prims in a given group to this group |
1964 | /// </summary> | 1964 | /// </summary> |
1965 | /// <remarks> | ||
1966 | /// Do not call this method directly - use Scene.LinkObjects() instead to avoid races between threads. | ||
1967 | /// FIXME: There are places where scripts call these methods directly without locking. This is a potential race condition. | ||
1968 | /// </remarks> | ||
1965 | /// <param name="objectGroup">The group of prims which should be linked to this group</param> | 1969 | /// <param name="objectGroup">The group of prims which should be linked to this group</param> |
1966 | public void LinkToGroup(SceneObjectGroup objectGroup) | 1970 | public void LinkToGroup(SceneObjectGroup objectGroup) |
1967 | { | 1971 | { |
@@ -2006,6 +2010,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2006 | linkPart.CreateSelected = true; | 2010 | linkPart.CreateSelected = true; |
2007 | 2011 | ||
2008 | linkPart.LinkNum = linkNum++; | 2012 | linkPart.LinkNum = linkNum++; |
2013 | linkPart.UpdatePrimFlags(UsesPhysics, IsTemporary, IsPhantom, IsVolumeDetect); | ||
2009 | 2014 | ||
2010 | SceneObjectPart[] ogParts = objectGroup.Parts; | 2015 | SceneObjectPart[] ogParts = objectGroup.Parts; |
2011 | Array.Sort(ogParts, delegate(SceneObjectPart a, SceneObjectPart b) | 2016 | Array.Sort(ogParts, delegate(SceneObjectPart a, SceneObjectPart b) |
@@ -2045,6 +2050,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2045 | /// Delink the given prim from this group. The delinked prim is established as | 2050 | /// Delink the given prim from this group. The delinked prim is established as |
2046 | /// an independent SceneObjectGroup. | 2051 | /// an independent SceneObjectGroup. |
2047 | /// </summary> | 2052 | /// </summary> |
2053 | /// <remarks> | ||
2054 | /// FIXME: This method should not be called directly since it bypasses update locking, allowing a potential race | ||
2055 | /// condition. But currently there is no | ||
2056 | /// alternative method that does take a lonk to delink a single prim. | ||
2057 | /// </remarks> | ||
2048 | /// <param name="partID"></param> | 2058 | /// <param name="partID"></param> |
2049 | /// <returns>The object group of the newly delinked prim. Null if part could not be found</returns> | 2059 | /// <returns>The object group of the newly delinked prim. Null if part could not be found</returns> |
2050 | public SceneObjectGroup DelinkFromGroup(uint partID) | 2060 | public SceneObjectGroup DelinkFromGroup(uint partID) |
@@ -2056,6 +2066,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2056 | /// Delink the given prim from this group. The delinked prim is established as | 2066 | /// Delink the given prim from this group. The delinked prim is established as |
2057 | /// an independent SceneObjectGroup. | 2067 | /// an independent SceneObjectGroup. |
2058 | /// </summary> | 2068 | /// </summary> |
2069 | /// <remarks> | ||
2070 | /// FIXME: This method should not be called directly since it bypasses update locking, allowing a potential race | ||
2071 | /// condition. But currently there is no | ||
2072 | /// alternative method that does take a lonk to delink a single prim. | ||
2073 | /// </remarks> | ||
2059 | /// <param name="partID"></param> | 2074 | /// <param name="partID"></param> |
2060 | /// <param name="sendEvents"></param> | 2075 | /// <param name="sendEvents"></param> |
2061 | /// <returns>The object group of the newly delinked prim. Null if part could not be found</returns> | 2076 | /// <returns>The object group of the newly delinked prim. Null if part could not be found</returns> |
@@ -2081,6 +2096,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2081 | /// Delink the given prim from this group. The delinked prim is established as | 2096 | /// Delink the given prim from this group. The delinked prim is established as |
2082 | /// an independent SceneObjectGroup. | 2097 | /// an independent SceneObjectGroup. |
2083 | /// </summary> | 2098 | /// </summary> |
2099 | /// <remarks> | ||
2100 | /// FIXME: This method should not be called directly since it bypasses update locking, allowing a potential race | ||
2101 | /// condition. But currently there is no | ||
2102 | /// alternative method that does take a lonk to delink a single prim. | ||
2103 | /// </remarks> | ||
2084 | /// <param name="partID"></param> | 2104 | /// <param name="partID"></param> |
2085 | /// <param name="sendEvents"></param> | 2105 | /// <param name="sendEvents"></param> |
2086 | /// <returns>The object group of the newly delinked prim.</returns> | 2106 | /// <returns>The object group of the newly delinked prim.</returns> |
@@ -2201,6 +2221,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2201 | oldRot = part.RotationOffset; | 2221 | oldRot = part.RotationOffset; |
2202 | Quaternion newRot = Quaternion.Inverse(parentRot) * oldRot; | 2222 | Quaternion newRot = Quaternion.Inverse(parentRot) * oldRot; |
2203 | part.RotationOffset = newRot; | 2223 | part.RotationOffset = newRot; |
2224 | |||
2225 | part.UpdatePrimFlags(UsesPhysics, IsTemporary, IsPhantom, IsVolumeDetect); | ||
2204 | } | 2226 | } |
2205 | 2227 | ||
2206 | /// <summary> | 2228 | /// <summary> |