change enconding of attachment updates NameValue and State fields

avinationmerge
UbitUmarov 2014-08-25 21:49:39 +01:00
parent b1f14ad62f
commit c24601bc6a
1 changed files with 19 additions and 0 deletions

View File

@ -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}",