Пример #1
0
        /// <summary>
        ///   Send an animation update to the given client
        /// </summary>
        /// <param name = "client"></param>
        public void SendAnimPackToClient(IClientAPI client)
        {
            if (m_scenePresence.IsChildAgent)
                return;

            UUID[] animations;
            int[] sequenceNums;
            UUID[] objectIDs;

            m_animations.GetArrays(out animations, out sequenceNums, out objectIDs);
            AnimationGroup anis = new AnimationGroup
                                      {
                                          Animations = animations,
                                          SequenceNums = sequenceNums,
                                          ObjectIDs = objectIDs,
                                          AvatarID = m_scenePresence.ControllingClient.AgentId
                                      };
            m_scenePresence.Scene.GetScenePresence(client.AgentId).SceneViewer.QueuePresenceForAnimationUpdate(
                m_scenePresence, anis);
        }
Пример #2
0
 /// <summary>
 /// Once the packet has been sent, allow newer animations to be sent for the given entity
 /// </summary>
 /// <param name="ID"></param>
 public void FinishedAnimationPacketSend(AnimationGroup update)
 {
     m_AnimationsInPacketQueue.Remove(update.AvatarID);
 }
Пример #3
0
        /// <summary>
        ///   Sends all clients the given information for this avatar
        /// </summary>
        /// <param name = "animations"></param>
        /// <param name = "seqs"></param>
        /// <param name = "objectIDs"></param>
        public void SendAnimPack(UUID[] animations, int[] sequenceNums, UUID[] objectIDs)
        {
            if (m_scenePresence.IsChildAgent)
                return;

            AnimationGroup anis = new AnimationGroup
                                      {
                                          Animations = animations,
                                          SequenceNums = sequenceNums,
                                          ObjectIDs = objectIDs,
                                          AvatarID = m_scenePresence.UUID
                                      };
#if (!ISWIN)
            m_scenePresence.Scene.ForEachScenePresence(
                delegate(IScenePresence presence)
                {
                    presence.SceneViewer.QueuePresenceForAnimationUpdate(presence, anis);
                });
#else
            m_scenePresence.Scene.ForEachScenePresence(
                presence => presence.SceneViewer.QueuePresenceForAnimationUpdate(presence, anis));
#endif
        }
Пример #4
0
        public void QueuePresenceForAnimationUpdate(IScenePresence presence, AnimationGroup animation)
        {
            if (Culler != null && !Culler.ShowEntityToClient (m_presence, presence))
            {
                //They are out of view and they changed, we need to update them when they do come in view
                lastPresencesInView.Remove (presence);
                return; // if 2 far ignore
            }

            lock (m_presenceAnimationsToSend)
            {
                m_presenceAnimationsToSend.Remove(animation.AvatarID);
                //Insert at the end
                m_presenceAnimationsToSend.Insert(m_presenceAnimationsToSend.Count, animation.AvatarID, animation);
            }
        }