mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
Fix issue where only one of multiple attachments on the same attachpoint for NPCs would be seen by other viewers.
It appears that at least Singularity 1.8.5 (but probably others) rely on attachment FromItemIDs being different to display more than one. This commit resolves this by generating random IDs instead of always using UUID.Zero for NPCs. Resolves http://opensimulator.org/mantis/view.php?id=7110
This commit is contained in:
@@ -5304,10 +5304,22 @@ 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);
|
||||
update.NameValue
|
||||
= Util.StringToBytes256(
|
||||
string.Format("AttachItemID STRING RW SV {0}", data.ParentGroup.FromItemID));
|
||||
|
||||
update.State = (byte)((data.ParentGroup.AttachmentPoint % 16) * 16 + (data.ParentGroup.AttachmentPoint / 16));
|
||||
|
||||
// m_log.DebugFormat(
|
||||
// "[LLCLIENTVIEW]: Sending NameValue {0} for {1} {2} to {3}",
|
||||
// Util.UTF8.GetString(update.NameValue), data.Name, data.LocalId, Name);
|
||||
//
|
||||
// m_log.DebugFormat(
|
||||
// "[LLCLIENTVIEW]: Sending state {0} for {1} {2} to {3}",
|
||||
// update.State, data.Name, data.LocalId, Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5318,10 +5330,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
update.State = data.ParentGroup.RootPart.Shape.State;
|
||||
}
|
||||
|
||||
// m_log.DebugFormat(
|
||||
// "[LLCLIENTVIEW]: Sending state {0} for {1} {2} to {3}",
|
||||
// update.State, data.Name, data.LocalId, Name);
|
||||
|
||||
update.ObjectData = objectData;
|
||||
update.ParentID = data.ParentID;
|
||||
update.PathBegin = data.Shape.PathBegin;
|
||||
|
||||
Reference in New Issue
Block a user