Beispiel #1
0
        protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, AgentCircuitManager circuitManager)
        {
            bool hgrid = ConfigSource.Source.Configs["Startup"].GetBoolean("hypergrid", false);

            if (hgrid)
            {
                return HGCommands.CreateScene(regionInfo, circuitManager, m_commsManager, storageManager, m_moduleLoader, m_configSettings, m_config, m_version);
            }

            SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager);

            return new Scene(
                regionInfo, circuitManager, m_commsManager, sceneGridService,
                storageManager, m_moduleLoader, m_configSettings.DumpAssetsToFile, m_configSettings.PhysicalPrim,
                m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version);
        }
Beispiel #2
0
        /// <summary>
        ///     Runs commands issued by the server console from the operator
        /// </summary>
        /// <param name="command">The first argument of the parameter (the command)</param>
        /// <param name="cmdparams">Additional arguments passed to the command</param>
        public void RunCommand(string module, string[] cmdparams)
        {
            List <string> args = new List <string>(cmdparams);

            if (args.Count < 1)
            {
                return;
            }

            string command = args[0];

            args.RemoveAt(0);

            cmdparams = args.ToArray();

            switch (command)
            {
            case "command-script":
                if (cmdparams.Length > 0)
                {
                    RunCommandScript(cmdparams[0]);
                }
                break;

            case "backup":
                m_sceneManager.BackupCurrentScene();
                break;

            case "remove-region":
                string regRemoveName = CombineParams(cmdparams, 0);

                Scene removeScene;

                if (m_sceneManager.TryGetScene(regRemoveName, out removeScene))
                {
                    RemoveRegion(removeScene, false);
                }
                else
                {
                    m_console.Error("no region with that name");
                }
                break;

            case "delete-region":
                string regDeleteName = CombineParams(cmdparams, 0);

                Scene killScene;

                if (m_sceneManager.TryGetScene(regDeleteName, out killScene))
                {
                    RemoveRegion(killScene, true);
                }
                else
                {
                    m_console.Error("no region with that name");
                }
                break;

            case "restart":
                m_sceneManager.RestartCurrentScene();
                break;

            case "Add-InventoryHost":
                if (cmdparams.Length > 0)
                {
                    m_commsManager.AddInventoryService(cmdparams[0]);
                }
                break;

            case "predecode-j2k":
                if (cmdparams.Length > 0)
                {
                    m_sceneManager.CacheJ2kDecode(Convert.ToInt32(cmdparams[0]));
                }
                else
                {
                    m_sceneManager.CacheJ2kDecode(1);
                }
                break;

            case "link-region":
            case "unlink-region":
            case "link-mapping":
                HGCommands.RunHGCommand(command, cmdparams, m_sceneManager.CurrentOrFirstScene);
                break;
            }
        }