diff options
author | Justin Clark-Casey (justincc) | 2012-07-05 00:05:06 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-07-05 00:05:06 +0100 |
commit | 951b45b80fd504b4874b9ec3e0fbff49a25cb46f (patch) | |
tree | 29b59d97d8b8ce8ee00227c41227d824d6694efa /OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs | |
parent | Use GetInventoryItem() in llRezAtRoot rather than iterating through a cloned ... (diff) | |
download | opensim-SC-951b45b80fd504b4874b9ec3e0fbff49a25cb46f.zip opensim-SC-951b45b80fd504b4874b9ec3e0fbff49a25cb46f.tar.gz opensim-SC-951b45b80fd504b4874b9ec3e0fbff49a25cb46f.tar.bz2 opensim-SC-951b45b80fd504b4874b9ec3e0fbff49a25cb46f.tar.xz |
Add OSSL function osForceAttachToAvatarFromInventory()
This works like osForceAttachToAvatar() but allows an object to be directly specified from the script object's inventory rather than forcing it to be rezzed in the scene first.
Still only attaches objects to the owner of the script.
This allows one to bypass the complicated co-ordination of first rezzing objects in the scene before attaching them.
Threat level high.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs index 81add43..3398a53 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs | |||
@@ -186,15 +186,15 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
186 | TestHelpers.InMethod(); | 186 | TestHelpers.InMethod(); |
187 | 187 | ||
188 | TestScene scene = new SceneHelpers().SetupScene(); | 188 | TestScene scene = new SceneHelpers().SetupScene(); |
189 | SceneObjectPart part = SceneHelpers.AddSceneObject(scene); | 189 | SceneObjectGroup so = SceneHelpers.AddSceneObject(scene); |
190 | 190 | ||
191 | Assert.That(part.ParentGroup.IsDeleted, Is.False); | 191 | Assert.That(so.IsDeleted, Is.False); |
192 | 192 | ||
193 | scene.DeleteSceneObject(part.ParentGroup, false); | 193 | scene.DeleteSceneObject(so, false); |
194 | 194 | ||
195 | Assert.That(part.ParentGroup.IsDeleted, Is.True); | 195 | Assert.That(so.IsDeleted, Is.True); |
196 | 196 | ||
197 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); | 197 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(so.LocalId); |
198 | Assert.That(retrievedPart, Is.Null); | 198 | Assert.That(retrievedPart, Is.Null); |
199 | } | 199 | } |
200 | 200 | ||
@@ -215,22 +215,22 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
215 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; | 215 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; |
216 | sogd.Enabled = false; | 216 | sogd.Enabled = false; |
217 | 217 | ||
218 | SceneObjectPart part = SceneHelpers.AddSceneObject(scene); | 218 | SceneObjectGroup so = SceneHelpers.AddSceneObject(scene); |
219 | 219 | ||
220 | IClientAPI client = SceneHelpers.AddScenePresence(scene, agentId).ControllingClient; | 220 | IClientAPI client = SceneHelpers.AddScenePresence(scene, agentId).ControllingClient; |
221 | scene.DeRezObjects(client, new System.Collections.Generic.List<uint>() { part.LocalId }, UUID.Zero, DeRezAction.Delete, UUID.Zero); | 221 | scene.DeRezObjects(client, new System.Collections.Generic.List<uint>() { so.LocalId }, UUID.Zero, DeRezAction.Delete, UUID.Zero); |
222 | 222 | ||
223 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); | 223 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(so.LocalId); |
224 | 224 | ||
225 | Assert.That(retrievedPart, Is.Not.Null); | 225 | Assert.That(retrievedPart, Is.Not.Null); |
226 | 226 | ||
227 | Assert.That(part.ParentGroup.IsDeleted, Is.False); | 227 | Assert.That(so.IsDeleted, Is.False); |
228 | 228 | ||
229 | sogd.InventoryDeQueueAndDelete(); | 229 | sogd.InventoryDeQueueAndDelete(); |
230 | 230 | ||
231 | Assert.That(part.ParentGroup.IsDeleted, Is.True); | 231 | Assert.That(so.IsDeleted, Is.True); |
232 | 232 | ||
233 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(part.LocalId); | 233 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); |
234 | Assert.That(retrievedPart2, Is.Null); | 234 | Assert.That(retrievedPart2, Is.Null); |
235 | } | 235 | } |
236 | 236 | ||