From c24601bc6a9be5ab84a8c7b4600382ef9f0c895e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 25 Aug 2014 21:49:39 +0100 Subject: [PATCH] change enconding of attachment updates NameValue and State fields --- .../ClientStack/Linden/UDP/LLClientView.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index e19877c690..b45d561038 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -5393,6 +5393,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP //update.JointType = 0; update.Material = data.Material; update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim +/* if (data.ParentGroup.IsAttachment) { update.NameValue = Util.StringToBytes256("AttachItemID STRING RW SV " + data.ParentGroup.FromItemID); @@ -5406,6 +5407,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP // case for attachments may contain conflicting values that can end up crashing the viewer. update.State = data.ParentGroup.RootPart.Shape.State; } + */ + + if (data.ParentGroup.IsAttachment) + { + if (data.UUID != data.ParentGroup.RootPart.UUID) + { + update.NameValue = Util.StringToBytes256("AttachItemID STRING RW SV " + data.ParentGroup.FromItemID); + } + else + update.NameValue = Utils.EmptyBytes; + + int st = (int)data.ParentGroup.RootPart.Shape.State; + st = (st & 0xf0) >> 4 + (st & 0x0f) << 4; + update.State = (byte)st; + } +// else +// update.State = data.Shape.State; // not sure about this + // m_log.DebugFormat( // "[LLCLIENTVIEW]: Sending state {0} for {1} {2} to {3}",