public SimAssetStore(BotClient GC) { TheStore = this; Client = GC; Manager = Client.Inventory; Manager.ItemReceived += Inventory_OnItemReceived; Manager.TaskItemReceived += Inventory_OnTaskItemReceived; Manager.FolderUpdated += Inventory_OnFolderUpdated; Inventory = Manager.Store; Client.Network.SimConnected += Ensure_Downloaded; SlowConnectedQueue.DebugQueue = true; FillAssetNames(); }
public WorldObjects(BotClient client) : base(client) { _defaultProvider = new DefaultWorldGroupProvider(this); MushDLR223.ScriptEngines.ScriptManager.AddGroupProvider(client, _defaultProvider); OnConnectedQueue = new TaskQueueHandler(client, new NamedPrefixThing("OnConnectedQueue", client.GetName), TimeSpan.FromMilliseconds(20), false); client.AddTaskQueue("OnConnectedQueue", OnConnectedQueue); client.WorldSystem = this; RegisterAll(); DLRConsole.TransparentCallers.Add(typeof (WorldObjects)); if (Utils.GetRunningRuntime() == Utils.Runtime.Mono) { // client.Settings.USE_LLSD_LOGIN = true; } //else ///client.Settings.USE_LLSD_LOGIN = true; // TODO client.Network.PacketEvents.SkipEvent += Network_SkipEvent; lock (WorldObjectsMasterLock) { ScriptManager.AddTypeChanger(this.TypeChangerProc); RegionMasterSimulatorsCatchUps = false; if (GridMaster == null || true) { GridMaster = this; if (client.Network.CurrentSim != null) RegionMasterSimulatorsCatchUps = true; if (RegionMasterSimulatorsCatchUps) { RegionMasterSimulatorsCatchUps = false; CatchUpQueue.AddFirst(DoCatchup); } client.Settings.USE_LLSD_LOGIN = true; } else { //only one rpc at a time (btw broken with OpenSim.. works with Linden) //client.Settings.USE_LLSD_LOGIN = true; } //new DebugAllEvents(client); client.Settings.ENABLE_CAPS = true; client.Settings.ENABLE_SIMSTATS = true; client.Settings.AVATAR_TRACKING = true; //client.Settings.THROTTLE_OUTGOING_PACKETS = true; client.Settings.MULTIPLE_SIMS = true; client.Settings.SEND_AGENT_THROTTLE = false; client.Settings.LOGIN_TIMEOUT = 10 * 1000; client.Settings.SIMULATOR_TIMEOUT = int.MaxValue; client.Settings.SEND_AGENT_UPDATES = true; client.Settings.SEND_PINGS = true; //client.Settings.DISABLE_AGENT_UPDATE_DUPLICATE_CHECK = true; //client.Self.Movement.AutoResetControls = false; //client.Self.Movement.UpdateInterval = 0; client.Network.SimConnected += Network_OnSimConnectedHook; client.Inventory.ScriptRunningReply += Inventory_OnScriptRunning; if (RegionMasterTexturePipeline == null) { RegionMasterTexturePipeline = client.Assets; //RegionMasterTexturePipeline.OnDownloadFinished += new TexturePipeline.DownloadFinishedCallback(RegionMasterTexturePipeline_OnDownloadFinished); client.Settings.USE_ASSET_CACHE = true; } else { //client.Settings.USE_TEXTURE_CACHE = false; } // must be after the pipeline is made _simAssetSystem = new SimAssetStore(client); if (GridMaster == this) { { //BotWorld = this; SimTypeSystem.LoadDefaultTypes(); } const int InterLeave = 3000; if (EnsureSelectedTimer == null) EnsureSelectedTimer = new Timer(ReallyEnsureSelected_Thread, null, InterLeave / 2, InterLeave); if (EnsureRequestedTimer == null) EnsureRequestedTimer = new Timer(ReallyEnsureRequested_Thread, null, InterLeave, InterLeave); if (_SimPaths == null) _SimPaths = new WorldPathSystem(this); } //SetWorldMaster(false); //RegisterAll(); } }