예제 #1
0
        public void SendTerseUpdateToClient(IClientAPI remoteClient)
        {
            if (ParentGroup == null || ParentGroup.IsDeleted || ParentGroup.InTransit)
                return;

            remoteClient.SendPrimTerseUpdate(this);
        }
예제 #2
0
        public void SendTerseUpdateToClient(IClientAPI remoteClient)
        {
            if (ParentGroup == null || ParentGroup.IsDeleted)
                return;

            Vector3 lPos = OffsetPosition;

            byte state = Shape.State;
            if (IsAttachment)
            {
                if (ParentGroup.RootPart != this)
                    return;

                lPos = ParentGroup.RootPart.AttachedPos;
                state = (byte)AttachmentPoint;
            }
            else
            {
                if (ParentGroup.RootPart == this)
                    lPos = AbsolutePosition;
            }
            
            // Causes this thread to dig into the Client Thread Data.
            // Remember your locking here!
            remoteClient.SendPrimTerseUpdate(new SendPrimitiveTerseData(m_regionHandle,
                    m_parentGroup.GetTimeDilation(), LocalId, lPos,
                    RotationOffset, Velocity, Acceleration,
                    RotationalVelocity, state, FromItemID,
                    OwnerID, (int)AttachmentPoint, null, ParentGroup.GetUpdatePriority(remoteClient)));
        }
예제 #3
0
        public void SendTerseUpdateToClient(IClientAPI remoteClient)
        {
            if (ParentGroup == null || ParentGroup.IsDeleted)
                return;

            Vector3 lPos = OffsetPosition;

            byte state = Shape.State;
            if (IsAttachment)
            {
                if (ParentGroup.RootPart != this)
                    return;

                lPos = ParentGroup.RootPart.AttachedPos;
                state = (byte)AttachmentPoint;
            }
            else
            {
                if (ParentGroup.RootPart == this)
                    lPos = AbsolutePosition;
            }

            remoteClient.SendPrimTerseUpdate(m_regionHandle,
                    (ushort)(m_parentGroup.GetTimeDilation() *
                    (float)ushort.MaxValue), LocalId, lPos,
                    RotationOffset, Velocity,
                    RotationalVelocity, state, FromAssetID,
                    OwnerID, (int)AttachmentPoint);
        }