aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-05-01 22:24:21 +0100
committerJustin Clark-Casey (justincc)2014-05-01 22:24:21 +0100
commitc31d93cb6f478062332c6a04fd1c357bb11205ee (patch)
treef0894436d88091db8b134ca99501589432a99673 /OpenSim/Region/ClientStack/Linden
parentminor: Use Vector2.Zero constant and only set in condition branch where it wa... (diff)
downloadopensim-SC_OLD-c31d93cb6f478062332c6a04fd1c357bb11205ee.zip
opensim-SC_OLD-c31d93cb6f478062332c6a04fd1c357bb11205ee.tar.gz
opensim-SC_OLD-c31d93cb6f478062332c6a04fd1c357bb11205ee.tar.bz2
opensim-SC_OLD-c31d93cb6f478062332c6a04fd1c357bb11205ee.tar.xz
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
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs18
1 files changed, 13 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 3ab837d..7cb5b53 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -5304,10 +5304,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5304 //update.JointType = 0; 5304 //update.JointType = 0;
5305 update.Material = data.Material; 5305 update.Material = data.Material;
5306 update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim 5306 update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim
5307
5307 if (data.ParentGroup.IsAttachment) 5308 if (data.ParentGroup.IsAttachment)
5308 { 5309 {
5309 update.NameValue = Util.StringToBytes256("AttachItemID STRING RW SV " + data.ParentGroup.FromItemID); 5310 update.NameValue
5311 = Util.StringToBytes256(
5312 string.Format("AttachItemID STRING RW SV {0}", data.ParentGroup.FromItemID));
5313
5310 update.State = (byte)((data.ParentGroup.AttachmentPoint % 16) * 16 + (data.ParentGroup.AttachmentPoint / 16)); 5314 update.State = (byte)((data.ParentGroup.AttachmentPoint % 16) * 16 + (data.ParentGroup.AttachmentPoint / 16));
5315
5316// m_log.DebugFormat(
5317// "[LLCLIENTVIEW]: Sending NameValue {0} for {1} {2} to {3}",
5318// Util.UTF8.GetString(update.NameValue), data.Name, data.LocalId, Name);
5319//
5320// m_log.DebugFormat(
5321// "[LLCLIENTVIEW]: Sending state {0} for {1} {2} to {3}",
5322// update.State, data.Name, data.LocalId, Name);
5311 } 5323 }
5312 else 5324 else
5313 { 5325 {
@@ -5318,10 +5330,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5318 update.State = data.ParentGroup.RootPart.Shape.State; 5330 update.State = data.ParentGroup.RootPart.Shape.State;
5319 } 5331 }
5320 5332
5321// m_log.DebugFormat(
5322// "[LLCLIENTVIEW]: Sending state {0} for {1} {2} to {3}",
5323// update.State, data.Name, data.LocalId, Name);
5324
5325 update.ObjectData = objectData; 5333 update.ObjectData = objectData;
5326 update.ParentID = data.ParentID; 5334 update.ParentID = data.ParentID;
5327 update.PathBegin = data.Shape.PathBegin; 5335 update.PathBegin = data.Shape.PathBegin;