コード例 #1
0
 private double?AvatarAppearancePrioritizer(InterestListEvent eventData, IScenePresence presence)
 {
     if (eventData.State != presence)
     {
         return(InterestListEventHandler.DefaultPrioritizer(eventData, presence).Value + 1.0); // Add one so the ObjectUpdate for this avatar has a higher priority
     }
     else
     {
         return(null); // Don't send AvatarAppearance packets to the agent controlling the avatar
     }
 }
コード例 #2
0
ファイル: Animations.cs プロジェクト: jhurliman/simian
        private double?ViewerEffectPrioritizer(InterestListEvent eventData, IScenePresence presence)
        {
            // Don't bother sending ViewerEffect packets further away than this
            const float VIEWER_EFFECT_CUTOFF = 64.0f * 64.0f;

            float distanceSq = Vector3.DistanceSquared(presence.ScenePosition, eventData.ScenePosition);

            if (distanceSq <= VIEWER_EFFECT_CUTOFF)
            {
                return(InterestListEventHandler.DefaultPrioritizer(eventData, presence));
            }
            else
            {
                return(null);
            }
        }
コード例 #3
0
ファイル: Chat.cs プロジェクト: jhurliman/simian
        private double?ChatPrioritizer(InterestListEvent eventData, IScenePresence presence)
        {
            ChatArgs args = (ChatArgs)eventData.State;

            switch (args.Type)
            {
            case EntityChatType.Owner:
            case EntityChatType.Debug:
                return(0.0);

            case EntityChatType.Broadcast:
                return(1.0);

            default:
                return(InterestListEventHandler.DefaultPrioritizer(eventData, presence));
            }
        }
コード例 #4
0
ファイル: Chat.cs プロジェクト: jhurliman/simian
        private double?TypingPrioritizer(InterestListEvent eventData, IScenePresence presence)
        {
            // This prioritizer will return the distance of the typing source to the current scene
            // presence. Lower numbers mean a higher priority, so the closer the source the
            // higher the priority. If the event is out of range for its audible distance,
            // the event will be suppressed entirely

            float distanceSq = Vector3.DistanceSquared(eventData.ScenePosition, presence.ScenePosition);

            if (distanceSq < NORMAL_DIST * NORMAL_DIST)
            {
                return(InterestListEventHandler.DefaultPrioritizer(eventData, presence));
            }
            else
            {
                return(null);
            }
        }
コード例 #5
0
ファイル: Animations.cs プロジェクト: jhurliman/simian
 private double?AnimationPrioritizer(InterestListEvent eventData, IScenePresence presence)
 {
     // Add one so the ObjectUpdate for this avatar has a higher priority
     return(InterestListEventHandler.DefaultPrioritizer(eventData, presence).Value + 1.0);
 }