mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +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:
@@ -122,7 +122,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
|
||||
string attName = "att";
|
||||
|
||||
SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, attName, sp.UUID).ParentGroup;
|
||||
SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, attName, sp.UUID);
|
||||
|
||||
scene.AttachmentsModule.AttachObject(sp, so, (uint)AttachmentPoint.Chest, false);
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap.Tests
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene);
|
||||
SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart;
|
||||
MediaEntry me = new MediaEntry();
|
||||
|
||||
m_module.SetMediaEntry(part, 1, me);
|
||||
@@ -88,7 +88,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap.Tests
|
||||
|
||||
string homeUrl = "opensimulator.org";
|
||||
|
||||
SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene);
|
||||
SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart;
|
||||
MediaEntry me = new MediaEntry() { HomeURL = homeUrl };
|
||||
|
||||
m_module.SetMediaEntry(part, 1, me);
|
||||
|
||||
Reference in New Issue
Block a user