Exemplo n.º 1
0
        /// <summary>
        /// Execute the region creation process.  This includes setting up scene infrastructure.
        /// </summary>
        /// <param name="regionInfo"></param>
        /// <param name="portadd_flag"></param>
        /// <param name="do_post_init"></param>
        /// <returns></returns>
        public void CreateRegion(RegionInfo regionInfo, out IScene m_scene)
        {
            // set the initial ports
            regionInfo.HttpPort = MainServer.Instance.Port;

            Scene scene = SetupScene(regionInfo, m_config);

            m_log.Info("[Modules]: Loading region modules");
            IRegionModulesController controller;

            if (m_OpenSimBase.ApplicationRegistry.TryRequestModuleInterface(out controller))
            {
                controller.AddRegionToModules(scene);
            }
            else
            {
                m_log.Error("[Modules]: The new RegionModulesController is missing...");
            }

            //Post init the modules now
            PostInitModules(scene);

            //Start the heartbeats
            scene.StartHeartbeat();
            //Tell the scene that the startup is complete
            // Note: this event is added in the scene constructor
            scene.FinishedStartup("Startup", new List <string>());

            m_scene = scene;
        }