From 88a63ecc39032ebb256caf34aec330d1cbb3d9c1 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 21 Dec 2015 18:13:07 +0000 Subject: drop attachments to ground a bit in front of the avatar, not on his location --- OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index ad889cb..d199a35 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -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(); } -- cgit v1.1