diff options
author | Justin Clarke Casey | 2008-11-01 21:50:07 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-11-01 21:50:07 +0000 |
commit | 7c04d278753c717a91e5eeb3086d62c771b03f05 (patch) | |
tree | d12e2a986af35e1c9b2cd45187e1ead4abb9ea26 /OpenSim/Region | |
parent | * Fix http://opensimulator.org/mantis/view.php?id=2517 (diff) | |
download | opensim-SC_OLD-7c04d278753c717a91e5eeb3086d62c771b03f05.zip opensim-SC_OLD-7c04d278753c717a91e5eeb3086d62c771b03f05.tar.gz opensim-SC_OLD-7c04d278753c717a91e5eeb3086d62c771b03f05.tar.bz2 opensim-SC_OLD-7c04d278753c717a91e5eeb3086d62c771b03f05.tar.xz |
* Introduce an IsAttachment property on the group level (which just returns false if the group is already deleted)
* This is to avoid repetitive null checks - I'm beginning to think that blasting away the root part on object deletion is actually a bad move. Perhaps we should leave it around
and let the client ignore any superfluous packets (which it may well do anyway), since we're constantly exposing a race condition
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 20 |
2 files changed, 21 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs index 8c623b1..b520642 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs | |||
@@ -276,7 +276,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
276 | { | 276 | { |
277 | SceneObjectGroup sceneObject = (SceneObjectGroup)entity; | 277 | SceneObjectGroup sceneObject = (SceneObjectGroup)entity; |
278 | 278 | ||
279 | if (sceneObject.RootPart != null && !sceneObject.RootPart.IsAttachment) | 279 | if (!sceneObject.IsDeleted && !sceneObject.IsAttachment) |
280 | sceneObjects.Add((SceneObjectGroup)entity); | 280 | sceneObjects.Add((SceneObjectGroup)entity); |
281 | } | 281 | } |
282 | } | 282 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index f4b6685..a94e592 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -93,6 +93,26 @@ namespace OpenSim.Region.Environment.Scenes | |||
93 | /// since the group's last persistent backup | 93 | /// since the group's last persistent backup |
94 | /// </summary> | 94 | /// </summary> |
95 | public bool HasGroupChanged = false; | 95 | public bool HasGroupChanged = false; |
96 | |||
97 | /// <value> | ||
98 | /// Is this scene object acting as an attachment? | ||
99 | /// | ||
100 | /// We return false if the group has already been deleted. | ||
101 | /// | ||
102 | /// TODO: At the moment set must be done on the part itself. There may be a case for doing it here since I | ||
103 | /// presume either all or no parts in a linkset can be part of an attachment (in which | ||
104 | /// case the value would get proprogated down into all the descendent parts). | ||
105 | /// </value> | ||
106 | public bool IsAttachment | ||
107 | { | ||
108 | get | ||
109 | { | ||
110 | if (!IsDeleted) | ||
111 | return m_rootPart.IsAttachment; | ||
112 | |||
113 | return false; | ||
114 | } | ||
115 | } | ||
96 | 116 | ||
97 | public float scriptScore = 0f; | 117 | public float scriptScore = 0f; |
98 | 118 | ||