drop attachments to ground a bit in front of the avatar, not on his location

LSLKeyTest
UbitUmarov 2015-12-21 18:13:07 +00:00
parent 7081ef948c
commit 88a63ecc39
1 changed files with 5 additions and 2 deletions

View File

@ -675,7 +675,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
public void DetachSingleAttachmentToGround(IScenePresence sp, uint soLocalId)
{
DetachSingleAttachmentToGround(sp, soLocalId, sp.AbsolutePosition, Quaternion.Identity);
Vector3 pos = new Vector3(2.5f, 0f, 0f);
pos *= ((ScenePresence)sp).Rotation;
pos += sp.AbsolutePosition;
DetachSingleAttachmentToGround(sp, soLocalId, pos, Quaternion.Identity);
}
public void DetachSingleAttachmentToGround(IScenePresence sp, uint soLocalId, Vector3 absolutePos, Quaternion absoluteRot)
@ -740,7 +743,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
so.ApplyPhysics();
so.HasGroupChanged = true;
rootPart.Rezzed = DateTime.Now;
so.AttachToBackup();
m_scene.EventManager.TriggerParcelPrimCountTainted();
@ -757,6 +759,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
// Attach (NULL) stops scripts. We don't want that. Resume them.
so.ResumeScripts();
so.HasGroupChanged = true;
so.RootPart.ScheduleFullUpdate();
so.ScheduleGroupForTerseUpdate();
}