mirror of
https://github.com/opensim/opensim.git
synced 2026-07-13 19:14:51 +08:00
remove TempAttachments module
This commit is contained in:
@@ -3864,7 +3864,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
}
|
||||
|
||||
public void llAttachToAvatar(int attachmentPoint)
|
||||
public void llAttachToAvatar(LSL_Integer attachmentPoint)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
@@ -3875,7 +3875,55 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
AttachToAvatar(attachmentPoint);
|
||||
}
|
||||
|
||||
public void llDetachFromAvatar()
|
||||
public void llAttachToAvatarTemp(LSL_Integer attachmentPoint)
|
||||
{
|
||||
IAttachmentsModule attachmentsModule = World.RequestModuleInterface<IAttachmentsModule>();
|
||||
if (attachmentsModule == null)
|
||||
return;
|
||||
|
||||
if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_ATTACH) != 0)
|
||||
return;
|
||||
|
||||
SceneObjectGroup grp = m_host.ParentGroup;
|
||||
if (grp == null || grp.IsDeleted || grp.IsAttachment)
|
||||
return;
|
||||
|
||||
ScenePresence target;
|
||||
if (!World.TryGetScenePresence(m_item.PermsGranter, out target))
|
||||
return;
|
||||
|
||||
if (target.UUID != grp.OwnerID)
|
||||
{
|
||||
uint effectivePerms = grp.EffectiveOwnerPerms;
|
||||
|
||||
if ((effectivePerms & (uint)PermissionMask.Transfer) == 0)
|
||||
return;
|
||||
|
||||
grp.SetOwner(target.UUID, target.ControllingClient.ActiveGroupId);
|
||||
|
||||
if (World.Permissions.PropagatePermissions())
|
||||
{
|
||||
foreach (SceneObjectPart child in grp.Parts)
|
||||
{
|
||||
child.Inventory.ChangeInventoryOwner(target.UUID);
|
||||
child.TriggerScriptChangedEvent(Changed.OWNER);
|
||||
child.ApplyNextOwnerPermissions();
|
||||
}
|
||||
grp.InvalidateEffectivePerms();
|
||||
}
|
||||
|
||||
grp.RootPart.ObjectSaleType = 0;
|
||||
grp.RootPart.SalePrice = 10;
|
||||
|
||||
grp.HasGroupChanged = true;
|
||||
grp.RootPart.SendPropertiesToClient(target.ControllingClient);
|
||||
grp.RootPart.ScheduleFullUpdate();
|
||||
}
|
||||
|
||||
attachmentsModule.AttachObject(target, grp, (uint)attachmentPoint, false, false, true);
|
||||
}
|
||||
|
||||
public void llDetachFromAvatar()
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
@@ -7873,7 +7921,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
|
||||
// http://wiki.secondlife.com/wiki/LlAvatarOnLinkSitTarget
|
||||
public LSL_Key llAvatarOnLinkSitTarget(int linknum)
|
||||
public LSL_Key llAvatarOnLinkSitTarget(LSL_Integer linknum)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
if(linknum == ScriptBaseClass.LINK_SET ||
|
||||
@@ -13052,10 +13100,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
float time = 0.0f; // default is from start
|
||||
|
||||
ScenePresence presence = null;
|
||||
|
||||
int cmd;
|
||||
for (int i = 0; i < commandList.Data.Length; i++)
|
||||
{
|
||||
int cmd;
|
||||
if(commandList.Data[i] is LSL_Integer)
|
||||
cmd = (LSL_Integer)commandList.Data[i];
|
||||
else
|
||||
|
||||
@@ -52,9 +52,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
void llApplyRotationalImpulse(LSL_Vector force, int local);
|
||||
LSL_Float llAsin(double val);
|
||||
LSL_Float llAtan2(double x, double y);
|
||||
void llAttachToAvatar(int attachment);
|
||||
void llAttachToAvatar(LSL_Integer attachment);
|
||||
void llAttachToAvatarTemp(LSL_Integer attachmentPoint);
|
||||
LSL_Key llAvatarOnSitTarget();
|
||||
LSL_Key llAvatarOnLinkSitTarget(int linknum);
|
||||
LSL_Key llAvatarOnLinkSitTarget(LSL_Integer linknum);
|
||||
LSL_Rotation llAxes2Rot(LSL_Vector fwd, LSL_Vector left, LSL_Vector up);
|
||||
LSL_Rotation llAxisAngle2Rot(LSL_Vector axis, double angle);
|
||||
LSL_Integer llBase64ToInteger(string str);
|
||||
|
||||
@@ -120,7 +120,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
return m_LSL_Functions.llAtan2(x, y);
|
||||
}
|
||||
|
||||
public void llAttachToAvatar(int attachment)
|
||||
public void llAttachToAvatar(LSL_Integer attachment)
|
||||
{
|
||||
m_LSL_Functions.llAttachToAvatar(attachment);
|
||||
}
|
||||
|
||||
public void llAttachToAvatarTemp(LSL_Integer attachment)
|
||||
{
|
||||
m_LSL_Functions.llAttachToAvatar(attachment);
|
||||
}
|
||||
@@ -130,7 +135,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
return m_LSL_Functions.llAvatarOnSitTarget();
|
||||
}
|
||||
|
||||
public LSL_Key llAvatarOnLinkSitTarget(int linknum)
|
||||
public LSL_Key llAvatarOnLinkSitTarget(LSL_Integer linknum)
|
||||
{
|
||||
return m_LSL_Functions.llAvatarOnLinkSitTarget(linknum);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user