diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 0af2ad2..36b4e10 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -1035,9 +1035,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1035 | public void DeleteGroup(bool silent) | 1035 | public void DeleteGroup(bool silent) |
1036 | { | 1036 | { |
1037 | // We need to keep track of this state in case this group is still queued for backup. | 1037 | // We need to keep track of this state in case this group is still queued for backup. |
1038 | // FIXME: This is a poor temporary solution, since it still leaves plenty of scope for race | ||
1039 | // conditions where a user deletes an entity while it is being stored. Really, the update | ||
1040 | // code needs a redesign. | ||
1041 | m_isDeleted = true; | 1038 | m_isDeleted = true; |
1042 | 1039 | ||
1043 | DetachFromBackup(); | 1040 | DetachFromBackup(); |
@@ -1063,9 +1060,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1063 | } | 1060 | } |
1064 | } | 1061 | } |
1065 | } | 1062 | } |
1066 | |||
1067 | m_rootPart = null; | ||
1068 | m_parts.Clear(); | ||
1069 | } | 1063 | } |
1070 | } | 1064 | } |
1071 | 1065 | ||
@@ -1228,7 +1222,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1228 | // Since this is the top of the section of call stack for backing up a particular scene object, don't let | 1222 | // Since this is the top of the section of call stack for backing up a particular scene object, don't let |
1229 | // any exception propogate upwards. | 1223 | // any exception propogate upwards. |
1230 | 1224 | ||
1231 | if (RootPart == null || UUID == UUID.Zero) | 1225 | if (IsDeleted || UUID == UUID.Zero) |
1232 | { | 1226 | { |
1233 | // DetachFromBackup(); | 1227 | // DetachFromBackup(); |
1234 | return; | 1228 | return; |
@@ -1932,8 +1926,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1932 | } | 1926 | } |
1933 | 1927 | ||
1934 | m_scene.UnlinkSceneObject(objectGroup.UUID, true); | 1928 | m_scene.UnlinkSceneObject(objectGroup.UUID, true); |
1935 | objectGroup.Children.Clear(); | 1929 | // objectGroup.Children.Clear(); |
1936 | objectGroup.m_rootPart = null; | 1930 | // objectGroup.m_rootPart = null; |
1937 | 1931 | ||
1938 | // TODO Deleting the original group object may cause problems later on if they have already | 1932 | // TODO Deleting the original group object may cause problems later on if they have already |
1939 | // made it into the update queue. However, sending out updates for those parts is now | 1933 | // made it into the update queue. However, sending out updates for those parts is now |
@@ -2803,6 +2797,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2803 | } | 2797 | } |
2804 | } | 2798 | } |
2805 | } | 2799 | } |
2800 | |||
2806 | public float GetMass() | 2801 | public float GetMass() |
2807 | { | 2802 | { |
2808 | float retmass = 0f; | 2803 | float retmass = 0f; |
@@ -2815,11 +2810,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
2815 | } | 2810 | } |
2816 | return retmass; | 2811 | return retmass; |
2817 | } | 2812 | } |
2813 | |||
2818 | public void CheckSculptAndLoad() | 2814 | public void CheckSculptAndLoad() |
2819 | { | 2815 | { |
2820 | lock (m_parts) | 2816 | lock (m_parts) |
2821 | { | 2817 | { |
2822 | if (RootPart != null) | 2818 | if (!IsDeleted) |
2823 | { | 2819 | { |
2824 | if ((RootPart.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) == 0) | 2820 | if ((RootPart.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) == 0) |
2825 | { | 2821 | { |