diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs index dd3f4b34f7..dc4d1db5f2 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs @@ -29,6 +29,7 @@ using System.Reflection; using System.Threading; using log4net; using Mono.Addins; +using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.RegionLoader.Filesystem; using OpenSim.Framework.RegionLoader.Web; diff --git a/OpenSim/Grid/ScriptServer/FakeScene.cs b/OpenSim/Grid/ScriptServer/FakeScene.cs index ffabfb5f3b..3dbb61afb2 100644 --- a/OpenSim/Grid/ScriptServer/FakeScene.cs +++ b/OpenSim/Grid/ScriptServer/FakeScene.cs @@ -31,6 +31,7 @@ using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Servers; using OpenSim.Region.Environment; using OpenSim.Region.Environment.Scenes; +using Nini.Config; namespace OpenSim.Grid.ScriptServer { @@ -39,11 +40,12 @@ namespace OpenSim.Grid.ScriptServer public FakeScene(RegionInfo regInfo, AgentCircuitManager authen, CommunicationsManager commsMan, SceneCommunicationService sceneGridService, AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer, - ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, bool sendTasksToChild) + ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, bool sendTasksToChild, IConfigSource config) : base( regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, httpServer, - moduleLoader, dumpAssetsToFile, physicalPrim, sendTasksToChild) + moduleLoader, dumpAssetsToFile, physicalPrim, sendTasksToChild, config) { + } // What does a scene have to do? :P diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index e7386ff45a..a8f4bd4ce9 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -96,6 +96,8 @@ namespace OpenSim protected List m_plugins = new List(); + protected IConfigSource m_finalConfig = null; + protected IniConfigSource m_config; public IniConfigSource ConfigSource @@ -309,10 +311,10 @@ namespace OpenSim m_dumpAssetsToFile = standaloneConfig.GetBoolean("dump_assets_to_file", false); } - //if (!m_sandbox) - //m_SendChildAgentTaskData = false; + m_networkServersInfo.loadFromConfiguration(m_config); + } private ManualResetEvent WorldHasComeToAnEnd = new ManualResetEvent(false); @@ -622,7 +624,8 @@ namespace OpenSim return new Scene(regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache, storageManager, m_httpServer, - m_moduleLoader, m_dumpAssetsToFile, m_physicalPrim, m_see_into_region_from_neighbor); + m_moduleLoader, m_dumpAssetsToFile, m_physicalPrim, m_see_into_region_from_neighbor, m_config); + } public void handleRestartRegion(RegionInfo whichRegion) @@ -668,7 +671,7 @@ namespace OpenSim protected override PhysicsScene GetPhysicsScene() { - return GetPhysicsScene(m_physicsEngine, m_meshEngineName); + return GetPhysicsScene(m_physicsEngine, m_meshEngineName, m_config); } /// diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 5e0e07484b..b16f74b269 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -30,6 +30,7 @@ using System.Net; using System.Reflection; using libsecondlife; using log4net; +using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Communications; using OpenSim.Framework.Communications.Cache; @@ -99,12 +100,12 @@ namespace OpenSim.Region.ClientStack protected abstract PhysicsScene GetPhysicsScene(); protected abstract StorageManager CreateStorageManager(string connectionstring); - protected PhysicsScene GetPhysicsScene(string engine, string meshEngine) + protected PhysicsScene GetPhysicsScene(string engine, string meshEngine, IConfigSource config) { PhysicsPluginManager physicsPluginManager; physicsPluginManager = new PhysicsPluginManager(); physicsPluginManager.LoadPlugins(); - return physicsPluginManager.GetPhysicsScene(engine, meshEngine); + return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config); } protected Scene SetupScene(RegionInfo regionInfo, out IClientNetworkServer clientServer) diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 4188deb7b6..5b93ef9db4 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -43,6 +43,7 @@ using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Modules.World.Terrain; using OpenSim.Region.Environment.Scenes.Scripting; using OpenSim.Region.Physics.Manager; +using Nini.Config; using Caps=OpenSim.Framework.Communications.Capabilities.Caps; using Image=System.Drawing.Image; using Timer=System.Timers.Timer; @@ -115,6 +116,7 @@ namespace OpenSim.Region.Environment.Scenes protected IWorldComm m_worldCommModule; protected IAvatarFactory m_AvatarFactory; protected IScenePermissions m_permissions; + protected IConfigSource m_config; // Central Update Loop @@ -134,6 +136,7 @@ namespace OpenSim.Region.Environment.Scenes private int m_update_backup = 200; private int m_update_terrain = 50; private int m_update_land = 1; + private int frameMS = 0; private int physicsMS2 = 0; @@ -223,8 +226,9 @@ namespace OpenSim.Region.Environment.Scenes public Scene(RegionInfo regInfo, AgentCircuitManager authen, CommunicationsManager commsMan, SceneCommunicationService sceneGridService, AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer, - ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, bool SeeIntoRegionFromNeighbor) + ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, bool SeeIntoRegionFromNeighbor, IConfigSource config) { + m_config = config; updateLock = new Mutex(false); m_moduleLoader = moduleLoader; m_authenticateHandler = authen; diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index eecd115f1f..d7c4013651 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -27,6 +27,7 @@ using System.Collections.Generic; using Axiom.Math; +using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Physics.Manager; @@ -70,7 +71,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { } - public override void Initialise(IMesher meshmerizer) + public override void Initialise(IMesher meshmerizer, IConfigSource config) { // Does nothing right now } diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs index ddfb5a4566..9415fffe59 100644 --- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs +++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs @@ -34,6 +34,7 @@ using OpenSim.Framework; using OpenSim.Region.Physics.Manager; using XnaDevRu.BulletX; using XnaDevRu.BulletX.Dynamics; +using Nini.Config; using AxiomQuaternion = Axiom.Math.Quaternion; #endregion @@ -483,6 +484,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin internal Dictionary _prims = new Dictionary(); public IMesher mesher; + private IConfigSource m_config; public static float Gravity @@ -536,9 +538,10 @@ namespace OpenSim.Region.Physics.BulletXPlugin //this._heightmap = new float[65536]; } - public override void Initialise(IMesher meshmerizer) + public override void Initialise(IMesher meshmerizer, IConfigSource config) { mesher = meshmerizer; + m_config = config; } public override void Dispose() diff --git a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs index e4ff7255ee..b8ca1804c3 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs @@ -29,6 +29,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Reflection; +using Nini.Config; using log4net; namespace OpenSim.Region.Physics.Manager @@ -47,7 +48,7 @@ namespace OpenSim.Region.Physics.Manager { } - public PhysicsScene GetPhysicsScene(string physEngineName, string meshEngineName) + public PhysicsScene GetPhysicsScene(string physEngineName, string meshEngineName, IConfigSource config) { if (String.IsNullOrEmpty(physEngineName)) { @@ -75,7 +76,7 @@ namespace OpenSim.Region.Physics.Manager { m_log.Info("[PHYSICS]: creating " + physEngineName); PhysicsScene result = _PhysPlugins[physEngineName].GetScene(); - result.Initialise(meshEngine); + result.Initialise(meshEngine, config); return result; } else diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index 4c509b7eaa..de93f22184 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs @@ -28,6 +28,7 @@ using System.Reflection; using Axiom.Math; using log4net; +using Nini.Config; using OpenSim.Framework; namespace OpenSim.Region.Physics.Manager @@ -58,7 +59,7 @@ namespace OpenSim.Region.Physics.Manager } - public abstract void Initialise(IMesher meshmerizer); + public abstract void Initialise(IMesher meshmerizer, IConfigSource config); public abstract PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size); @@ -92,7 +93,7 @@ namespace OpenSim.Region.Physics.Manager private static int m_workIndicator; - public override void Initialise(IMesher meshmerizer) + public override void Initialise(IMesher meshmerizer, IConfigSource config) { // Does nothing right now } diff --git a/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs b/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs index 94d98cb375..bdc5b00784 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs @@ -27,6 +27,7 @@ using System; using Axiom.Math; +using Nini.Config; using NUnit.Framework; using OpenSim.Framework; using OpenSim.Region.Physics.Manager; @@ -50,7 +51,7 @@ namespace OpenSim.Region.Physics.OdePlugin // Getting Physics Scene ps = cbt.GetScene(); // Initializing Physics Scene. - ps.Initialise(imp.GetMesher()); + ps.Initialise(imp.GetMesher(),null); float[] _heightmap = new float[256 * 256]; for (int i = 0; i<(256*256);i++) { diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index c2a1c8e9ba..da720928af 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -32,6 +32,7 @@ using System.Runtime.InteropServices; using System.Threading; using Axiom.Math; using log4net; +using Nini.Config; using Ode.NET; using OpenSim.Framework; using OpenSim.Region.Physics.Manager; @@ -193,6 +194,8 @@ namespace OpenSim.Region.Physics.OdePlugin public IMesher mesher; + private IConfigSource m_config; + /// /// Initiailizes the scene @@ -286,9 +289,10 @@ namespace OpenSim.Region.Physics.OdePlugin // Initialize the mesh plugin - public override void Initialise(IMesher meshmerizer) + public override void Initialise(IMesher meshmerizer, IConfigSource config) { mesher = meshmerizer; + m_config = config; } internal void waitForSpaceUnlock(IntPtr space) diff --git a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs index 96e67d11b8..9ca1b23b7e 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs +++ b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs @@ -28,6 +28,7 @@ using System; using System.Collections.Generic; using Axiom.Math; +using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Physics.Manager; @@ -73,7 +74,7 @@ namespace OpenSim.Region.Physics.POSPlugin { } - public override void Initialise(IMesher meshmerizer) + public override void Initialise(IMesher meshmerizer, IConfigSource config) { // Does nothing right now } diff --git a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs index 712d10e5fa..175d749a85 100644 --- a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs +++ b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs @@ -27,6 +27,7 @@ using System; using System.Collections.Generic; +using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Physics.Manager; using PhysXWrapper; @@ -84,7 +85,7 @@ namespace OpenSim.Region.Physics.PhysXPlugin scene = mySdk.CreateScene(); } - public override void Initialise(IMesher meshmerizer) + public override void Initialise(IMesher meshmerizer, IConfigSource config) { // Does nothing right now } diff --git a/prebuild.xml b/prebuild.xml index 2b1e35b1cf..01e888e328 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -505,6 +505,7 @@ ../../../../bin/ + @@ -527,6 +528,7 @@ ../../../../bin/ + @@ -550,6 +552,7 @@ + @@ -574,6 +577,7 @@ + @@ -602,6 +606,7 @@ + @@ -630,6 +635,7 @@ +