Ejemplo n.º 1
0
        /// <summary>
        /// Sends a full update to the client
        /// </summary>
        /// <param name="remoteClient"></param>
        /// <param name="lPos"></param>
        /// <param name="clientFlags"></param>
        public void SendFullUpdateToClient(IClientAPI remoteClient, Vector3 lPos, uint clientFlags)
        {
            // Suppress full updates during attachment editing
            //
            if (ParentGroup.IsSelected && IsAttachment)
                return;
            
            if (ParentGroup.IsDeleted)
                return;

            clientFlags &= ~(uint) PrimFlags.CreateSelected;

            if (remoteClient.AgentId == _ownerID)
            {
                if ((uint) (_flags & PrimFlags.CreateSelected) != 0)
                {
                    clientFlags |= (uint) PrimFlags.CreateSelected;
                    _flags &= ~PrimFlags.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(new SendPrimitiveData(m_regionHandle, m_parentGroup.GetTimeDilation(), LocalId, m_shape,
                                               lPos, Velocity, Acceleration, RotationOffset, RotationalVelocity, clientFlags, m_uuid, _ownerID,
                                               m_text, color, _parentID, m_particleSystem, m_clickAction, (byte)m_material, m_TextureAnimation, IsAttachment,
                                               AttachmentPoint,FromItemID, Sound, SoundGain, SoundFlags, SoundRadius, ParentGroup.GetUpdatePriority(remoteClient)));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Sends a full update to the client
        /// </summary>
        /// <param name="remoteClient"></param>
        /// <param name="lPos"></param>
        /// <param name="clientFlags"></param>
        /// <param name="updateFlags">The properties that were changed that caused this update</param>
        public void SendFullUpdateToClient(IClientAPI remoteClient, Vector3 lPos,
            uint clientFlags, PrimUpdateFlags updateFlags)
        {
            if (m_parentGroup.IsDeleted)
                return;
            if (m_parentGroup.InTransit)
                return;

            clientFlags &= ~(uint) PrimFlags.CreateSelected;
            if ((uint)(_flags & PrimFlags.Scripted) != 0)
                clientFlags |= (uint)PrimFlags.Scripted;
            else
                clientFlags &= ~(uint)PrimFlags.Scripted;

            if (remoteClient.AgentId == _ownerID)
            {
                if ((uint)(_flags & PrimFlags.CreateSelected) != 0)
                {
                    clientFlags |= (uint)PrimFlags.CreateSelected;
                    _flags &= ~PrimFlags.CreateSelected;
                }
            }
            else
            {   // Someone else's object
                // If it's worn as a HUD, don't send this no matter what
                if (ParentGroup.IsAttachedHUD)
                    return;
            }

            remoteClient.SendPrimitiveToClient(this, clientFlags, lPos, updateFlags);
        }