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/OptionalModules/World | |
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/OptionalModules/World')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs index 65dad2d..9179966 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | |||
@@ -301,7 +301,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests | |||
301 | UUID npcId = m_npcMod.CreateNPC("John", "Smith", startPos, UUID.Zero, true, m_scene, sp.Appearance); | 301 | UUID npcId = m_npcMod.CreateNPC("John", "Smith", startPos, UUID.Zero, true, m_scene, sp.Appearance); |
302 | 302 | ||
303 | ScenePresence npc = m_scene.GetScenePresence(npcId); | 303 | ScenePresence npc = m_scene.GetScenePresence(npcId); |
304 | SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene); | 304 | SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart; |
305 | 305 | ||
306 | part.SitTargetPosition = new Vector3(0, 0, 1); | 306 | part.SitTargetPosition = new Vector3(0, 0, 1); |
307 | m_npcMod.Sit(npc.UUID, part.UUID, m_scene); | 307 | m_npcMod.Sit(npc.UUID, part.UUID, m_scene); |
@@ -333,7 +333,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests | |||
333 | UUID npcId = m_npcMod.CreateNPC("John", "Smith", startPos, UUID.Zero, true, m_scene, sp.Appearance); | 333 | UUID npcId = m_npcMod.CreateNPC("John", "Smith", startPos, UUID.Zero, true, m_scene, sp.Appearance); |
334 | 334 | ||
335 | ScenePresence npc = m_scene.GetScenePresence(npcId); | 335 | ScenePresence npc = m_scene.GetScenePresence(npcId); |
336 | SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene); | 336 | SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart; |
337 | 337 | ||
338 | m_npcMod.Sit(npc.UUID, part.UUID, m_scene); | 338 | m_npcMod.Sit(npc.UUID, part.UUID, m_scene); |
339 | 339 | ||