private void StartupPostLoginQueues() { lock (DidStartupPostLoginQueuesLock) { if (DidStartupPostLoginQueues) { return; } DidStartupPostLoginQueues = true; } ParentGrabber.Start(); CatchUpQueue.Start(); MetaDataQueue.Start(); OnConnectedQueue.Start(); SimAssetStore.TaskQueueStart(); SlowConnectedQueue.Enqueue(() => SlowConnectedQueue.DebugQueue = false); SlowConnectedQueue.Start(); client.OneAtATimeQueue.Start(); TaskInvGrabber.Start(); }
public ImageDownload StartTextureDownload(UUID id) { AssetType type = AssetType.Texture; SimAsset simAsset = SimAssetStore.FindOrCreateAsset(id, type); AssetCache Cache = (RegionMasterTexturePipeline == null ? null : RegionMasterTexturePipeline.Cache); if (Cache != null && Cache.HasAsset(id #if COGBOT_LIBOMV , type #endif )) { ImageDownload dl = Cache.GetCachedImage(id); if (dl != null) { simAsset.SetAsset(dl); } return(dl); } lock (TexturesSkipped) if (TexturesSkipped.Contains(id)) { return(null); } lock (AssetRequestType) { if (AssetRequestType.ContainsKey(id)) { return(null); } AssetRequestType[id] = AssetType.Texture; } TextureRequested++; SlowConnectedQueue.Enqueue(() => client.Assets.RequestImage(id, ImageType.Normal, RegionMasterTexturePipeline_OnDownloadFinished)); return(null); }
//public override void Assets_OnXferReceived(XferDownload xfer) //{ // //AssetRequests. // //RegisterUUIDMaybe(xfer.ID, xfer); //} public SimAsset EnqueueRequestAsset(UUID id, AssetType assetType, bool priority) { if (id == UUID.Zero) { return(null); } SimAsset sa = SimAssetStore.FindOrCreateAsset(id, assetType); if (!sa.NeedsRequest) { return(sa); } if (assetType == AssetType.Texture) { StartTextureDownload(id); return(sa); } sa.NeedsRequest = false; if (assetType == AssetType.SoundWAV) { return(sa); } //if (assetType == AssetType.Sound) return sa; lock (AssetRequestType) { if (AssetRequestType.ContainsKey(id)) { return(sa); } AssetRequestType[id] = assetType; SlowConnectedQueue.Enqueue( () => RegionMasterTexturePipeline.RequestAsset(id, assetType, priority, Assets_OnAssetReceived)); } return(sa); }