mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
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.
This commit is contained in:
@@ -301,7 +301,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
|
||||
UUID npcId = m_npcMod.CreateNPC("John", "Smith", startPos, UUID.Zero, true, m_scene, sp.Appearance);
|
||||
|
||||
ScenePresence npc = m_scene.GetScenePresence(npcId);
|
||||
SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene);
|
||||
SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart;
|
||||
|
||||
part.SitTargetPosition = new Vector3(0, 0, 1);
|
||||
m_npcMod.Sit(npc.UUID, part.UUID, m_scene);
|
||||
@@ -333,7 +333,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
|
||||
UUID npcId = m_npcMod.CreateNPC("John", "Smith", startPos, UUID.Zero, true, m_scene, sp.Appearance);
|
||||
|
||||
ScenePresence npc = m_scene.GetScenePresence(npcId);
|
||||
SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene);
|
||||
SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart;
|
||||
|
||||
m_npcMod.Sit(npc.UUID, part.UUID, m_scene);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user