public void Initialize(RegionInfo regionInfo, AgentCircuitManager authen, List <IClientNetworkServer> clientServers) { Initialize(regionInfo); //Set up the clientServer m_clientServers = clientServers; foreach (IClientNetworkServer clientServer in clientServers) { clientServer.AddScene(this); } m_sceneManager = RequestModuleInterface <SceneManager> (); m_simDataStore = m_sceneManager.GetNewSimulationDataStore(); m_config = m_sceneManager.ConfigSource; m_authenticateHandler = authen; m_AuroraEventManager = new AuroraEventManager(); m_eventManager = new EventManager(); m_permissions = new ScenePermissions(this); // Load region settings m_regInfo.RegionSettings = Aurora.DataManager.DataManager.RequestPlugin <IRegionInfoConnector> ().LoadRegionSettings(m_regInfo.RegionID); m_sceneGraph = new SceneGraph(this, m_regInfo) { Entities = new AsyncEntityManager(this) }; #region Region Config IConfig aurorastartupConfig = m_config.Configs["AuroraStartup"]; if (aurorastartupConfig != null) { //Region specific is still honored here, the RegionInfo checks for it, and if it is 0, it didn't set it if (RegionInfo.ObjectCapacity == 0) { RegionInfo.ObjectCapacity = aurorastartupConfig.GetInt("ObjectCapacity", 80000); } } IConfig packetConfig = m_config.Configs["PacketPool"]; if (packetConfig != null) { PacketPool.Instance.RecyclePackets = packetConfig.GetBoolean("RecyclePackets", true); PacketPool.Instance.RecycleDataBlocks = packetConfig.GetBoolean("RecycleDataBlocks", true); } #endregion Region Config m_basesimfps = 45f; m_basesimphysfps = 45f; m_basesimphysfps = Config.Configs["Physics"].GetFloat("BasePhysicsFPS", 45f); if (m_basesimphysfps > 45f) { m_basesimphysfps = 45f; } m_basesimfps = Config.Configs["Protection"].GetFloat("BaseRateFramesPerSecond", 45f); if (m_basesimfps > 45f) { m_basesimfps = 45f; } if (m_basesimphysfps > m_basesimfps) { m_basesimphysfps = m_basesimfps; } m_updatetimespan = 1000 / m_basesimfps; m_physicstimespan = 1000 / m_basesimphysfps; #region Startup Complete config EventManager.OnAddToStartupQueue += AddToStartupQueue; EventManager.OnModuleFinishedStartup += FinishedStartup; //EventManager.OnStartupComplete += StartupComplete; AddToStartupQueue("Startup"); #endregion }
public void Initialize(RegionInfo regionInfo, ISimulationDataStore dataStore, AgentCircuitManager authen, List<IClientNetworkServer> clientServers) { Initialize(regionInfo); //Set up the clientServer m_clientServers = clientServers; foreach (IClientNetworkServer clientServer in clientServers) { clientServer.AddScene(this); } m_sceneManager = RequestModuleInterface<ISceneManager>(); m_simDataStore = dataStore; m_config = m_sceneManager.ConfigSource; m_authenticateHandler = authen; m_AuroraEventManager = new AuroraEventManager(); m_eventManager = new EventManager(); m_permissions = new ScenePermissions(this); m_sceneGraph = new SceneGraph(this, m_regInfo); #region Region Config IConfig aurorastartupConfig = m_config.Configs["AuroraStartup"]; if (aurorastartupConfig != null) { //Region specific is still honored here, the RegionInfo checks for it, and if it is 0, it didn't set it if (RegionInfo.ObjectCapacity == 0) RegionInfo.ObjectCapacity = aurorastartupConfig.GetInt("ObjectCapacity", 80000); } IConfig packetConfig = m_config.Configs["PacketPool"]; if (packetConfig != null) { PacketPool.Instance.RecyclePackets = packetConfig.GetBoolean("RecyclePackets", true); PacketPool.Instance.RecycleDataBlocks = packetConfig.GetBoolean("RecycleDataBlocks", true); } #endregion Region Config m_basesimfps = 45f; m_basesimphysfps = 45f; m_basesimphysfps = Config.Configs["Physics"].GetFloat("BasePhysicsFPS", 45f); if (m_basesimphysfps > 45f) m_basesimphysfps = 45f; m_basesimfps = Config.Configs["Protection"].GetFloat("BaseRateFramesPerSecond", 45f); if (m_basesimfps > 45f) m_basesimfps = 45f; if (m_basesimphysfps > m_basesimfps) m_basesimphysfps = m_basesimfps; m_updatetimespan = 1000/m_basesimfps; m_physicstimespan = 1000/m_basesimphysfps; #region Startup Complete config EventManager.OnAddToStartupQueue += AddToStartupQueue; EventManager.OnModuleFinishedStartup += FinishedStartup; //EventManager.OnStartupComplete += StartupComplete; AddToStartupQueue("Startup"); #endregion }
public void Initialize(RegionInfo regionInfo, AgentCircuitManager authen, List <IClientNetworkServer> clientServers) { Initialize(regionInfo); //Set up the clientServer m_clientServers = clientServers; foreach (IClientNetworkServer clientServer in clientServers) { clientServer.AddScene(this); } m_sceneManager = RequestModuleInterface <ISceneManager>(); m_simDataStore = m_sceneManager.GetSimulationDataStore(); m_config = m_sceneManager.ConfigSource; m_authenticateHandler = authen; m_AuroraEventManager = new AuroraEventManager(); m_eventManager = new EventManager(); m_permissions = new ScenePermissions(this); m_sceneGraph = new SceneGraph(this, m_regInfo); #region Region Config IConfig packetConfig = m_config.Configs["PacketPool"]; if (packetConfig != null) { PacketPool.Instance.RecyclePackets = packetConfig.GetBoolean("RecyclePackets", true); PacketPool.Instance.RecycleDataBlocks = packetConfig.GetBoolean("RecycleDataBlocks", true); } #endregion Region Config m_basesimfps = 45f; m_basesimphysfps = 45f; m_basesimphysfps = Config.Configs["Physics"].GetFloat("BasePhysicsFPS", 45f); m_basesimfps = Config.Configs["Protection"].GetFloat("BaseRateFramesPerSecond", 45f); if (m_basesimphysfps > 45f) { m_basesimphysfps = 45f; } if (m_basesimfps > 45f) { m_basesimfps = 45f; } if (m_basesimphysfps > m_basesimfps) { m_basesimphysfps = m_basesimfps; } m_updatetimespan = 1000 / m_basesimfps; m_physicstimespan = 1000 / m_basesimphysfps; #region Startup Complete config EventManager.OnAddToStartupQueue += AddToStartupQueue; EventManager.OnModuleFinishedStartup += FinishedStartup; //EventManager.OnStartupComplete += StartupComplete; AddToStartupQueue("Startup"); #endregion }