From da47bcae3ec625e7cb8dc1947d1aa39ba7b8ac0f Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Mon, 16 Sep 2013 09:42:14 +0300 Subject: When moving the root prim of an attachment: a) Change the attach position; b) Move the other prims in the reverse direction to compensate --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 23507f4..e31270c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -3043,13 +3043,10 @@ namespace OpenSim.Region.Framework.Scenes Vector3 oldPos; - // FIXME: This improves the situation where editing just the root prim of an attached object would send - // all the other parts to oblivion after detach/reattach. However, a problem remains since the root prim - // still ends up in the wrong position on reattach. if (IsAttachment) - oldPos = RootPart.OffsetPosition; + oldPos = m_rootPart.AttachedPos + m_rootPart.OffsetPosition; // OffsetPosition should always be 0 in an attachments's root prim else - oldPos = AbsolutePosition + RootPart.OffsetPosition; + oldPos = AbsolutePosition + m_rootPart.OffsetPosition; Vector3 diff = oldPos - newPos; Quaternion partRotation = m_rootPart.RotationOffset; @@ -3064,6 +3061,9 @@ namespace OpenSim.Region.Framework.Scenes } AbsolutePosition = newPos; + + if (IsAttachment) + m_rootPart.AttachedPos = newPos; HasGroupChanged = true; ScheduleGroupForTerseUpdate(); -- cgit v1.1 From 9050c152b402d0c629b7050033c4d9361fda637b Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 4 Jan 2014 21:18:37 +0000 Subject: Dynamically adjust to the number of visual params sent. --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index c38c829..0ebccbe 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -3634,7 +3634,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP AvatarAppearancePacket avp = (AvatarAppearancePacket)PacketPool.Instance.GetPacket(PacketType.AvatarAppearance); // TODO: don't create new blocks if recycling an old packet - avp.VisualParam = new AvatarAppearancePacket.VisualParamBlock[218]; + avp.VisualParam = new AvatarAppearancePacket.VisualParamBlock[visualParams.Length]; avp.ObjectData.TextureEntry = textureEntry; AvatarAppearancePacket.VisualParamBlock avblock = null; -- cgit v1.1