Exemple #1
0
        public void Start(IScene scene)
        {
            m_scene = scene;

            m_udp = m_scene.GetSceneModule <LLUDP>();
            if (m_udp != null)
            {
                // Register for the LLUDP chat packet
                m_udp.AddPacketHandler(PacketType.ChatFromViewer, ChatFromViewerHandler);

                // Register for the generic scene chat event
                m_scene.OnEntityChat += ChatHandler;

                // Register for the generic presence alert event
                m_scene.OnPresenceAlert += PresenceAlertHandler;

                // Add event callbacks for two interest list events that we define: typing and chat
                m_scene.AddInterestListHandler(VIEWER_TYPING, new InterestListEventHandler {
                    PriorityCallback = TypingPrioritizer, SendCallback = SendTypingPackets
                });
                m_scene.AddInterestListHandler(VIEWER_CHAT, new InterestListEventHandler {
                    PriorityCallback = ChatPrioritizer, SendCallback = SendChatPackets
                });
            }
        }
Exemple #2
0
        public void Start(IScene scene)
        {
            m_scene = scene;

            m_terrain = m_scene.GetSceneModule <ITerrain>();
            if (m_terrain == null)
            {
                m_log.Error("LayerData requires an ITerrain module");
                return;
            }

            m_udp = m_scene.GetSceneModule <LLUDP>();
            if (m_udp != null)
            {
                m_udp.AddPacketHandler(PacketType.ModifyLand, ModifyLandHandler);

                m_scene.AddInterestListHandler(TERRAIN, new InterestListEventHandler {
                    SendCallback = SendTerrainPacket
                });

                m_scene.OnPresenceAdd            += PresenceAddHandler;
                m_terrain.OnHeightmapChanged     += HeightmapChangedHandler;
                m_terrain.OnHeightmapAreaChanged += HeightmapAreaChangedHandler;
            }
        }
Exemple #3
0
        public void Start(IScene scene)
        {
            m_scene = scene;

            m_udp = m_scene.GetSceneModule<LLUDP>();
            if (m_udp != null)
            {
                m_scene.AddInterestListHandler(AVATAR_ANIMATION, new InterestListEventHandler { PriorityCallback = AnimationPrioritizer, SendCallback = SendAvatarAnimationPackets });
                m_scene.AddInterestListHandler(VIEWER_EFFECT, new InterestListEventHandler { PriorityCallback = ViewerEffectPrioritizer, SendCallback = SendViewerEffectPackets });

                m_udp.AddPacketHandler(PacketType.AgentAnimation, AgentAnimationHandler);
                m_udp.AddPacketHandler(PacketType.ViewerEffect, ViewerEffectHandler);

                m_scene.OnPresenceAdd += PresenceAddHandler;
                m_scene.OnSendPresenceAnimations += SendPresenceAnimationsHandler;
            }
        }
Exemple #4
0
        public void Start(IScene scene)
        {
            m_scene = scene;

            m_udp = m_scene.GetSceneModule<LLUDP>();
            if (m_udp != null)
            {
                m_scene.AddInterestListHandler(PRELOAD_SOUND, new InterestListEventHandler { SendCallback = SendPreloadSoundsPacket });
            }
        }
Exemple #5
0
        public void Start(IScene scene)
        {
            m_scene = scene;

            m_udp = m_scene.GetSceneModule <LLUDP>();
            if (m_udp != null)
            {
                m_scene.AddInterestListHandler(PRELOAD_SOUND, new InterestListEventHandler {
                    SendCallback = SendPreloadSoundsPacket
                });
            }
        }
Exemple #6
0
        public void Start(IScene scene)
        {
            m_scene = scene;

            m_udp = m_scene.GetSceneModule <LLUDP>();
            if (m_udp != null)
            {
                m_scene.AddInterestListHandler(AVATAR_ANIMATION, new InterestListEventHandler {
                    PriorityCallback = AnimationPrioritizer, SendCallback = SendAvatarAnimationPackets
                });
                m_scene.AddInterestListHandler(VIEWER_EFFECT, new InterestListEventHandler {
                    PriorityCallback = ViewerEffectPrioritizer, SendCallback = SendViewerEffectPackets
                });

                m_udp.AddPacketHandler(PacketType.AgentAnimation, AgentAnimationHandler);
                m_udp.AddPacketHandler(PacketType.ViewerEffect, ViewerEffectHandler);

                m_scene.OnPresenceAdd            += PresenceAddHandler;
                m_scene.OnSendPresenceAnimations += SendPresenceAnimationsHandler;
            }
        }
Exemple #7
0
        public void Start(IScene scene)
        {
            m_scene = scene;

            m_userClient = m_scene.Simian.GetAppModule<IUserClient>();
            m_inventoryClient = m_scene.Simian.GetAppModule<IInventoryClient>();

            m_udp = m_scene.GetSceneModule<LLUDP>();
            if (m_udp != null)
            {
                m_udp.AddPacketHandler(PacketType.AgentSetAppearance, AgentSetAppearanceHandler);
                m_udp.AddPacketHandler(PacketType.AgentWearablesRequest, AgentWearablesRequestHandler);
                m_udp.AddPacketHandler(PacketType.AgentIsNowWearing, AgentIsNowWearingHandler);
                m_udp.AddPacketHandler(PacketType.AgentCachedTexture, AgentCachedTextureHandler);

                m_scene.AddInterestListHandler(AVATAR_APPEARANCE, new InterestListEventHandler
                    { PriorityCallback = AvatarAppearancePrioritizer, SendCallback = SendAvatarAppearancePackets });

                m_scene.OnPresenceAdd += PresenceAddHandler;
            }
        }
        public void Start(IScene scene)
        {
            m_scene = scene;

            m_userClient      = m_scene.Simian.GetAppModule <IUserClient>();
            m_inventoryClient = m_scene.Simian.GetAppModule <IInventoryClient>();

            m_udp = m_scene.GetSceneModule <LLUDP>();
            if (m_udp != null)
            {
                m_udp.AddPacketHandler(PacketType.AgentSetAppearance, AgentSetAppearanceHandler);
                m_udp.AddPacketHandler(PacketType.AgentWearablesRequest, AgentWearablesRequestHandler);
                m_udp.AddPacketHandler(PacketType.AgentIsNowWearing, AgentIsNowWearingHandler);
                m_udp.AddPacketHandler(PacketType.AgentCachedTexture, AgentCachedTextureHandler);

                m_scene.AddInterestListHandler(AVATAR_APPEARANCE, new InterestListEventHandler
                {
                    PriorityCallback = AvatarAppearancePrioritizer, SendCallback = SendAvatarAppearancePackets
                });

                m_scene.OnPresenceAdd += PresenceAddHandler;
            }
        }
Exemple #9
0
        public void Start(IScene scene)
        {
            m_scene = scene;

            m_terrain = m_scene.GetSceneModule<ITerrain>();
            if (m_terrain == null)
            {
                m_log.Error("LayerData requires an ITerrain module");
                return;
            }

            m_udp = m_scene.GetSceneModule<LLUDP>();
            if (m_udp != null)
            {
                m_udp.AddPacketHandler(PacketType.ModifyLand, ModifyLandHandler);

                m_scene.AddInterestListHandler(TERRAIN, new InterestListEventHandler { SendCallback = SendTerrainPacket });

                m_scene.OnPresenceAdd += PresenceAddHandler;
                m_terrain.OnHeightmapChanged += HeightmapChangedHandler;
                m_terrain.OnHeightmapAreaChanged += HeightmapAreaChangedHandler;
            }
        }
Exemple #10
0
        public void Start(IScene scene)
        {
            m_scene = scene;

            m_udp = m_scene.GetSceneModule<LLUDP>();
            if (m_udp != null)
            {
                // Register for the LLUDP chat packet
                m_udp.AddPacketHandler(PacketType.ChatFromViewer, ChatFromViewerHandler);

                // Register for the generic scene chat event
                m_scene.OnEntityChat += ChatHandler;

                // Register for the generic presence alert event
                m_scene.OnPresenceAlert += PresenceAlertHandler;

                // Add event callbacks for two interest list events that we define: typing and chat
                m_scene.AddInterestListHandler(VIEWER_TYPING, new InterestListEventHandler { PriorityCallback = TypingPrioritizer, SendCallback = SendTypingPackets });
                m_scene.AddInterestListHandler(VIEWER_CHAT, new InterestListEventHandler { PriorityCallback = ChatPrioritizer, SendCallback = SendChatPackets });
            }
        }
Exemple #11
0
        public void Start(IScene scene)
        {
            m_scene = scene;

            m_primMesher = m_scene.GetSceneModule<IPrimMesher>();
            if (m_primMesher == null)
            {
                m_log.Error("Objects requires an IPrimMesher");
                return;
            }

            m_permissions = m_scene.GetSceneModule<LLPermissions>();
            if (m_permissions == null)
            {
                m_log.Error("Objects requires LLPermissions");
                return;
            }

            // Optional modules
            m_physics = m_scene.GetSceneModule<IPhysicsEngine>();
            m_lslScriptEngine = m_scene.GetSceneModule<ILSLScriptEngine>();
            m_inventory = m_scene.GetSceneModule<Inventory>();

            // Collision handler
            if (m_physics != null && m_lslScriptEngine != null)
            {
                m_physics.OnEntityCollision += EntityCollisionHandler;
            }

            m_udp = m_scene.GetSceneModule<LLUDP>();
            if (m_udp != null)
            {
                m_udp.AddPacketHandler(PacketType.ObjectAdd, ObjectAddHandler);
                m_udp.AddPacketHandler(PacketType.ObjectAttach, ObjectAttachHandler);
                m_udp.AddPacketHandler(PacketType.ObjectDrop, ObjectDropHandler);
                m_udp.AddPacketHandler(PacketType.ObjectDuplicate, ObjectDuplicateHandler);
                m_udp.AddPacketHandler(PacketType.ObjectName, ObjectNameHandler);
                m_udp.AddPacketHandler(PacketType.ObjectSelect, ObjectSelectHandler);
                m_udp.AddPacketHandler(PacketType.ObjectDeselect, ObjectDeselectHandler);
                m_udp.AddPacketHandler(PacketType.ObjectGrab, ObjectGrabHandler);
                m_udp.AddPacketHandler(PacketType.ObjectGrabUpdate, ObjectGrabUpdateHandler);
                m_udp.AddPacketHandler(PacketType.ObjectDeGrab, ObjectDeGrabHandler);
                m_udp.AddPacketHandler(PacketType.ObjectLink, ObjectLinkHandler);
                m_udp.AddPacketHandler(PacketType.ObjectDelink, ObjectDelinkHandler);
                m_udp.AddPacketHandler(PacketType.ObjectShape, ObjectShapeHandler);
                m_udp.AddPacketHandler(PacketType.ObjectFlagUpdate, ObjectFlagUpdateHandler);
                m_udp.AddPacketHandler(PacketType.ObjectExtraParams, ObjectExtraParamsHandler);
                m_udp.AddPacketHandler(PacketType.ObjectImage, ObjectImageHandler);
                m_udp.AddPacketHandler(PacketType.ObjectPermissions, ObjectPermissionsHandler);
                m_udp.AddPacketHandler(PacketType.Undo, UndoHandler);
                m_udp.AddPacketHandler(PacketType.Redo, RedoHandler);
                m_udp.AddPacketHandler(PacketType.MultipleObjectUpdate, MultipleObjectUpdateHandler);
                m_udp.AddPacketHandler(PacketType.RequestObjectPropertiesFamily, RequestObjectPropertiesFamilyHandler);

                m_scene.AddInterestListHandler(OBJECT_UPDATE, new InterestListEventHandler { CombineCallback = ObjectUpdateCombiner, SendCallback = SendEntityPackets });
                m_scene.AddInterestListHandler(OBJECT_REMOVE, new InterestListEventHandler { CombineCallback = ObjectUpdateCombiner, SendCallback = SendKillPacket });

                m_scene.OnEntityAddOrUpdate += EntityAddOrUpdateHandler;
                m_scene.OnEntityRemove += EntityRemoveHandler;
                m_scene.OnPresenceAdd += PresenceAddHandler;
            }

            m_proxyPrim = new Primitive();
            m_proxyPrim.PrimData = ObjectManager.BuildBasicShape(PrimType.Box);
        }