public void Start(IScene scene) { m_scene = scene; m_regionInfo = scene.GetSceneModule <RegionInfo>(); m_permissions = scene.GetSceneModule <LLPermissions>(); m_estateClient = scene.Simian.GetAppModule <IEstateClient>(); if (m_estateClient != null) { if (!m_estateClient.TryGetEstate(scene.ID, out m_estate)) { // FIXME: Get the config file entry for this sim's estate name and join it or // create it if it doesn't exist } } m_udp = m_scene.GetSceneModule <LLUDP>(); if (m_udp != null) { m_udp.AddPacketHandler(PacketType.RequestRegionInfo, RequestRegionInfoHandler); m_udp.AddPacketHandler(PacketType.EstateCovenantRequest, EstateCovenantRequestHandler); m_udp.AddPacketHandler(PacketType.EstateOwnerMessage, EstateOwnerMessageHandler); m_udp.AddPacketHandler(PacketType.GodlikeMessage, GodlikeMessageHandler); m_udp.AddPacketHandler(PacketType.GodUpdateRegionInfo, GodUpdateRegionInfoHandler); } }
public void Start(IScene scene) { m_scene = scene; m_regionInfo = m_scene.GetSceneModule<RegionInfo>(); m_permissions = m_scene.GetSceneModule<LLPermissions>(); m_udp = m_scene.GetSceneModule<LLUDP>(); if (m_udp != null) { m_udp.AddPacketHandler(PacketType.UseCircuitCode, UseCircuitCodeHandler); m_udp.AddPacketHandler(PacketType.CompleteAgentMovement, CompleteAgentMovementHandler); m_udp.AddPacketHandler(PacketType.LogoutRequest, LogoutRequestHandler); m_udp.AddPacketHandler(PacketType.AgentThrottle, AgentThrottleHandler); m_udp.AddPacketHandler(PacketType.RegionHandshakeReply, RegionHandshakeReplyHandler); } }
public void Start(IScene scene) { m_scene = scene; m_regionInfo = m_scene.GetSceneModule <RegionInfo>(); m_permissions = m_scene.GetSceneModule <LLPermissions>(); m_udp = m_scene.GetSceneModule <LLUDP>(); if (m_udp != null) { m_udp.AddPacketHandler(PacketType.UseCircuitCode, UseCircuitCodeHandler); m_udp.AddPacketHandler(PacketType.CompleteAgentMovement, CompleteAgentMovementHandler); m_udp.AddPacketHandler(PacketType.LogoutRequest, LogoutRequestHandler); m_udp.AddPacketHandler(PacketType.AgentThrottle, AgentThrottleHandler); m_udp.AddPacketHandler(PacketType.RegionHandshakeReply, RegionHandshakeReplyHandler); m_udp.AddPacketHandler(PacketType.AgentFOV, AgentFOVHandler); m_udp.AddPacketHandler(PacketType.AgentHeightWidth, AgentHeightWidthHandler); } }
public void Start(IScene scene) { m_scene = scene; m_permissions = m_scene.GetSceneModule <LLPermissions>(); m_parcels = m_scene.GetSceneModule <IParcels>(); if (m_parcels == null) { m_log.Error("Cannot load Parcels without an IParcels"); return; } m_udp = m_scene.GetSceneModule <LLUDP>(); if (m_udp != null) { m_udp.AddPacketHandler(PacketType.ParcelInfoRequest, ParcelInfoRequestHandler); m_udp.AddPacketHandler(PacketType.ParcelDwellRequest, ParcelDwellRequestHandler); m_udp.AddPacketHandler(PacketType.ParcelObjectOwnersRequest, ParcelObjectOwnersRequestHandler); m_udp.AddPacketHandler(PacketType.ParcelPropertiesRequest, ParcelPropertiesRequestHandler); m_udp.AddPacketHandler(PacketType.ParcelPropertiesRequestByID, ParcelPropertiesRequestByIDHandler); m_udp.AddPacketHandler(PacketType.ParcelPropertiesUpdate, ParcelPropertiesUpdateHandler); m_udp.AddPacketHandler(PacketType.ParcelAccessListRequest, ParcelAccessListRequestHandler); m_udp.AddPacketHandler(PacketType.ParcelAccessListUpdate, ParcelAccessListUpdateHandler); m_udp.AddPacketHandler(PacketType.ParcelSetOtherCleanTime, ParcelSetOtherCleanTimeHandler); m_udp.AddPacketHandler(PacketType.ParcelDivide, ParcelDivideHandler); m_udp.AddPacketHandler(PacketType.ParcelJoin, ParcelJoinHandler); m_udp.AddPacketHandler(PacketType.ParcelDeedToGroup, ParcelDeedToGroupHandler); m_udp.AddPacketHandler(PacketType.ParcelRelease, ParcelReleaseHandler); m_udp.AddPacketHandler(PacketType.ParcelBuy, ParcelBuyHandler); m_udp.AddPacketHandler(PacketType.ParcelBuyPass, ParcelBuyPassHandler); m_udp.AddPacketHandler(PacketType.ParcelSelectObjects, ParcelSelectObjectsHandler); m_udp.AddPacketHandler(PacketType.ParcelDisableObjects, ParcelDisableObjectsHandler); m_udp.AddPacketHandler(PacketType.ParcelReturnObjects, ParcelReturnObjectsHandler); m_udp.AddPacketHandler(PacketType.ParcelGodForceOwner, ParcelGodForceOwnerHandler); m_udp.AddPacketHandler(PacketType.ParcelGodMarkAsContent, ParcelGodMarkAsContentHandler); m_scene.OnPresenceAdd += PresenceAddHandler; m_scene.OnEntitySignificantMovement += EntitySignificantMovementHandler; } }
public void Start(IScene scene) { m_scene = scene; m_permissions = m_scene.GetSceneModule<LLPermissions>(); m_parcels = m_scene.GetSceneModule<IParcels>(); if (m_parcels == null) { m_log.Error("Cannot load Parcels without an IParcels"); return; } m_udp = m_scene.GetSceneModule<LLUDP>(); if (m_udp != null) { m_udp.AddPacketHandler(PacketType.ParcelInfoRequest, ParcelInfoRequestHandler); m_udp.AddPacketHandler(PacketType.ParcelDwellRequest, ParcelDwellRequestHandler); m_udp.AddPacketHandler(PacketType.ParcelObjectOwnersRequest, ParcelObjectOwnersRequestHandler); m_udp.AddPacketHandler(PacketType.ParcelPropertiesRequest, ParcelPropertiesRequestHandler); m_udp.AddPacketHandler(PacketType.ParcelPropertiesRequestByID, ParcelPropertiesRequestByIDHandler); m_udp.AddPacketHandler(PacketType.ParcelPropertiesUpdate, ParcelPropertiesUpdateHandler); m_udp.AddPacketHandler(PacketType.ParcelAccessListRequest, ParcelAccessListRequestHandler); m_udp.AddPacketHandler(PacketType.ParcelAccessListUpdate, ParcelAccessListUpdateHandler); m_udp.AddPacketHandler(PacketType.ParcelSetOtherCleanTime, ParcelSetOtherCleanTimeHandler); m_udp.AddPacketHandler(PacketType.ParcelDivide, ParcelDivideHandler); m_udp.AddPacketHandler(PacketType.ParcelJoin, ParcelJoinHandler); m_udp.AddPacketHandler(PacketType.ParcelDeedToGroup, ParcelDeedToGroupHandler); m_udp.AddPacketHandler(PacketType.ParcelRelease, ParcelReleaseHandler); m_udp.AddPacketHandler(PacketType.ParcelBuy, ParcelBuyHandler); m_udp.AddPacketHandler(PacketType.ParcelBuyPass, ParcelBuyPassHandler); m_udp.AddPacketHandler(PacketType.ParcelSelectObjects, ParcelSelectObjectsHandler); m_udp.AddPacketHandler(PacketType.ParcelDisableObjects, ParcelDisableObjectsHandler); m_udp.AddPacketHandler(PacketType.ParcelReturnObjects, ParcelReturnObjectsHandler); m_udp.AddPacketHandler(PacketType.ParcelGodForceOwner, ParcelGodForceOwnerHandler); m_udp.AddPacketHandler(PacketType.ParcelGodMarkAsContent, ParcelGodMarkAsContentHandler); m_scene.OnPresenceAdd += PresenceAddHandler; m_scene.OnEntitySignificantMovement += EntitySignificantMovementHandler; } }
public void Start(IScene scene) { m_scene = scene; m_assets = m_scene.Simian.GetAppModule <IAssetClient>(); if (m_assets == null) { m_log.Error("Can't initialize asset transfers without an IAssetClient"); return; } m_permissions = m_scene.GetSceneModule <LLPermissions>(); m_udp = m_scene.GetSceneModule <LLUDP>(); if (m_udp != null) { m_udp.AddPacketHandler(PacketType.RequestXfer, RequestXferHandler); m_udp.AddPacketHandler(PacketType.ConfirmXferPacket, ConfirmXferPacketHandler); m_udp.AddPacketHandler(PacketType.AssetUploadRequest, AssetUploadRequestHandler); m_udp.AddPacketHandler(PacketType.SendXferPacket, SendXferPacketHandler); m_udp.AddPacketHandler(PacketType.AbortXfer, AbortXferHandler); m_udp.AddPacketHandler(PacketType.TransferRequest, TransferRequestHandler); } }
public void Start(IScene scene) { m_scene = scene; m_assets = m_scene.Simian.GetAppModule<IAssetClient>(); if (m_assets == null) { m_log.Error("Can't initialize asset transfers without an IAssetClient"); return; } m_permissions = m_scene.GetSceneModule<LLPermissions>(); m_udp = m_scene.GetSceneModule<LLUDP>(); if (m_udp != null) { m_udp.AddPacketHandler(PacketType.RequestXfer, RequestXferHandler); m_udp.AddPacketHandler(PacketType.ConfirmXferPacket, ConfirmXferPacketHandler); m_udp.AddPacketHandler(PacketType.AssetUploadRequest, AssetUploadRequestHandler); m_udp.AddPacketHandler(PacketType.SendXferPacket, SendXferPacketHandler); m_udp.AddPacketHandler(PacketType.AbortXfer, AbortXferHandler); m_udp.AddPacketHandler(PacketType.TransferRequest, TransferRequestHandler); } }
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); }
public void Start(IScene scene) { m_scene = scene; m_scheduler = m_scene.Simian.GetAppModule<IScheduler>(); if (m_scheduler == null) { m_log.Error("Inventory requires an IScheduler"); return; } m_inventoryClient = m_scene.Simian.GetAppModule<IInventoryClient>(); if (m_inventoryClient == null) { m_log.Error("Inventory requires an IInventoryClient"); return; } m_assetClient = m_scene.Simian.GetAppModule<IAssetClient>(); if (m_assetClient == null) { m_log.Error("Inventory requires an IAssetClient"); return; } m_primMesher = m_scene.GetSceneModule<IPrimMesher>(); if (m_primMesher == null) { m_log.Error("Inventory requires an IPrimMesher"); return; } m_physics = m_scene.GetSceneModule<IPhysicsEngine>(); m_permissions = m_scene.GetSceneModule<LLPermissions>(); m_udp = m_scene.GetSceneModule<LLUDP>(); if (m_udp != null) { m_udp.AddPacketHandler(PacketType.CreateInventoryItem, CreateInventoryItemHandler); m_udp.AddPacketHandler(PacketType.CreateInventoryFolder, CreateInventoryFolderHandler); m_udp.AddPacketHandler(PacketType.UpdateInventoryItem, UpdateInventoryItemHandler); m_udp.AddPacketHandler(PacketType.UpdateInventoryFolder, UpdateInventoryFolderHandler); m_udp.AddPacketHandler(PacketType.FetchInventoryDescendents, FetchInventoryDescendentsHandler); m_udp.AddPacketHandler(PacketType.FetchInventory, FetchInventoryHandler); m_udp.AddPacketHandler(PacketType.CopyInventoryItem, CopyInventoryItemHandler); m_udp.AddPacketHandler(PacketType.MoveInventoryItem, MoveInventoryItemHandler); m_udp.AddPacketHandler(PacketType.MoveInventoryFolder, MoveInventoryFolderHandler); m_udp.AddPacketHandler(PacketType.RemoveInventoryItem, RemoveInventoryItemHandler); m_udp.AddPacketHandler(PacketType.RemoveInventoryFolder, RemoveInventoryFolderHandler); m_udp.AddPacketHandler(PacketType.PurgeInventoryDescendents, PurgeInventoryDescendentsHandler); m_udp.AddPacketHandler(PacketType.DeRezObject, DeRezObjectHandler); m_udp.AddPacketHandler(PacketType.RezObject, RezObjectHandler); m_udp.AddPacketHandler(PacketType.LinkInventoryItem, LinkInventoryItemHandler); } }
public void Start(IScene scene) { m_scene = scene; m_regionInfo = scene.GetSceneModule<RegionInfo>(); m_permissions = scene.GetSceneModule<LLPermissions>(); m_estateClient = scene.Simian.GetAppModule<IEstateClient>(); if (m_estateClient != null) { if (!m_estateClient.TryGetEstate(scene.ID, out m_estate)) { // FIXME: Get the config file entry for this sim's estate name and join it or // create it if it doesn't exist } } m_udp = m_scene.GetSceneModule<LLUDP>(); if (m_udp != null) { m_udp.AddPacketHandler(PacketType.RequestRegionInfo, RequestRegionInfoHandler); m_udp.AddPacketHandler(PacketType.EstateCovenantRequest, EstateCovenantRequestHandler); m_udp.AddPacketHandler(PacketType.EstateOwnerMessage, EstateOwnerMessageHandler); m_udp.AddPacketHandler(PacketType.GodlikeMessage, GodlikeMessageHandler); m_udp.AddPacketHandler(PacketType.GodUpdateRegionInfo, GodUpdateRegionInfoHandler); } }
public static void SendRegionHandshake(LLAgent agent, LLUDP udp, IScene scene, RegionInfo regionInfo, LLPermissions permissions) { RegionHandshakePacket handshake = new RegionHandshakePacket(); // If the CacheID changes, the viewer will purge its object cache for this scene. We // just use the sceneID as the cacheID to make sure the viewer retains its object cache handshake.RegionInfo.CacheID = scene.ID; handshake.RegionInfo.SimName = Utils.StringToBytes(scene.Name); handshake.RegionInfo2.RegionID = scene.ID; handshake.RegionInfo.IsEstateManager = (permissions != null) ? permissions.IsEstateManager(agent) : true; handshake.RegionInfo3.ColoName = Utils.EmptyBytes; handshake.RegionInfo3.CPUClassID = 0; handshake.RegionInfo3.CPURatio = 0; if (regionInfo != null) { handshake.RegionInfo3.ProductName = Utils.StringToBytes(PRODUCT_NAME); handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes; handshake.RegionInfo.RegionFlags = (uint)regionInfo.RegionFlags; handshake.RegionInfo.SimAccess = (byte)regionInfo.SimAccess; handshake.RegionInfo.SimOwner = regionInfo.OwnerID; handshake.RegionInfo.TerrainBase0 = UUID.Zero; handshake.RegionInfo.TerrainBase1 = UUID.Zero; handshake.RegionInfo.TerrainBase2 = UUID.Zero; handshake.RegionInfo.TerrainBase3 = UUID.Zero; handshake.RegionInfo.TerrainDetail0 = regionInfo.TerrainDetail0; handshake.RegionInfo.TerrainDetail1 = regionInfo.TerrainDetail1; handshake.RegionInfo.TerrainDetail2 = regionInfo.TerrainDetail2; handshake.RegionInfo.TerrainDetail3 = regionInfo.TerrainDetail3; handshake.RegionInfo.TerrainHeightRange00 = regionInfo.TerrainHeightRange00; handshake.RegionInfo.TerrainHeightRange01 = regionInfo.TerrainHeightRange01; handshake.RegionInfo.TerrainHeightRange10 = regionInfo.TerrainHeightRange10; handshake.RegionInfo.TerrainHeightRange11 = regionInfo.TerrainHeightRange11; handshake.RegionInfo.TerrainStartHeight00 = regionInfo.TerrainStartHeight00; handshake.RegionInfo.TerrainStartHeight01 = regionInfo.TerrainStartHeight01; handshake.RegionInfo.TerrainStartHeight10 = regionInfo.TerrainStartHeight10; handshake.RegionInfo.TerrainStartHeight11 = regionInfo.TerrainStartHeight11; handshake.RegionInfo.WaterHeight = regionInfo.WaterHeight; } else { handshake.RegionInfo3.ProductName = Utils.EmptyBytes; handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes; handshake.RegionInfo.SimAccess = (byte)SimAccess.PG; } udp.SendPacket(agent, handshake, ThrottleCategory.Task, false); }
private static PrimFlags GetUpdateFlags(LLPrimitive prim, IScenePresence sendingTo, LLPermissions m_permissions) { PrimFlags flags; if (m_permissions != null && sendingTo != null) { flags = m_permissions.GetFlagsFor(sendingTo, prim); } else { flags = PrimFlags.CastShadows | PrimFlags.ObjectCopy | PrimFlags.ObjectTransfer | PrimFlags.ObjectYouOwner | PrimFlags.ObjectModify | PrimFlags.ObjectMove | PrimFlags.ObjectOwnerModify; } return flags; }