From 9892e115ccdcc8567087041917fb5c7694aa8836 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 28 Apr 2011 20:19:54 -0700 Subject: Fatpack message on agent transfers: 1 message only (UpdateAgent) containing the agent and all attachments. Preserves backwards compatibility -- older sims get passed attachments one by one. Meaning that I finally introduced versioning in the simulation service. --- .../CoreModules/Avatar/Attachments/AttachmentsModule.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar') diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index ff26264..520d794 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -562,14 +562,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments /// /// /// - /// + /// /// - protected void AttachToAgent(ScenePresence avatar, SceneObjectGroup so, uint attachmentpoint, Vector3 AttachOffset, bool silent) + protected void AttachToAgent(ScenePresence avatar, SceneObjectGroup so, uint attachmentpoint, Vector3 attachOffset, bool silent) { - // don't attach attachments to child agents - if (avatar.IsChildAgent) return; -// m_log.DebugFormat("[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1}", Name, avatar.Name); + m_log.DebugFormat("[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1} in pt {2} pos {3} {4}", Name, avatar.Name, + attachmentpoint, attachOffset, so.RootPart.AttachedPos); so.DetachFromBackup(); @@ -590,8 +589,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments so.RootPart.PhysActor = null; } - so.AbsolutePosition = AttachOffset; - so.RootPart.AttachedPos = AttachOffset; + so.AbsolutePosition = attachOffset; + so.RootPart.AttachedPos = attachOffset; so.RootPart.IsAttachment = true; so.RootPart.SetParentLocalId(avatar.LocalId); -- cgit v1.1