From 910f9d10d6b67156bc4a7e982555bfad1bb7e713 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 17 Aug 2008 03:09:47 +0000 Subject: * half of the attachmentpoint skull fix * There's still a full object update coming when you release the attachment after modifying it that's killing it sometimes. --- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index aec1b46..5038afc 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -2105,6 +2105,9 @@ namespace OpenSim.Region.Environment.Scenes _flags &= ~LLObject.ObjectFlags.CreateSelected; } } + //bool isattachment = IsAttachment; + //if (LocalId != ParentGroup.RootPart.LocalId) + //isattachment = ParentGroup.RootPart.IsAttachment; byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A}; remoteClient.SendPrimitiveToClient(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, m_shape, @@ -2237,8 +2240,13 @@ namespace OpenSim.Region.Environment.Scenes public void SendTerseUpdateToClient(IClientAPI remoteClient, LLVector3 lPos) { LLQuaternion mRot = RotationOffset; + //bool isattachment = IsAttachment; + //if (LocalId != ParentGroup.RootPart.LocalId) + //isattachment = ParentGroup.RootPart.IsAttachment; + if (IsAttachment) { + //m_log.Debug(AttachmentPoint.ToString()); remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, lPos, mRot, Velocity, RotationalVelocity, (byte)((AttachmentPoint % 16) * 16 + (AttachmentPoint / 16)),FromAssetID); } else @@ -2260,6 +2268,15 @@ namespace OpenSim.Region.Environment.Scenes { this.AttachmentPoint = AttachmentPoint; + if (AttachmentPoint != 0) + { + IsAttachment = true; + } + else + { + IsAttachment = false; + } + // save the attachment point. //if (AttachmentPoint != 0) //{ -- cgit v1.1