Exemple #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);
        }
Exemple #2
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(m_scenePresence, anis);
                });
            #else
            m_scenePresence.Scene.ForEachScenePresence(
                presence => presence.SceneViewer.QueuePresenceForAnimationUpdate(presence, anis));
            #endif
        }