* Removed some superfluous assigns
* Moved physics plugin scene creation into local scopeafrisby
parent
58f4d69833
commit
e6dea73d1f
|
@ -57,11 +57,7 @@ namespace OpenSim
|
||||||
sandBoxMode = true;
|
sandBoxMode = true;
|
||||||
startLoginServer = true;
|
startLoginServer = true;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
if (args[i] == "-loginserver")
|
|
||||||
{
|
|
||||||
startLoginServer = true;
|
|
||||||
}*/
|
|
||||||
if (args[i] == "-accounts")
|
if (args[i] == "-accounts")
|
||||||
{
|
{
|
||||||
userAccounts = true;
|
userAccounts = true;
|
||||||
|
@ -69,17 +65,14 @@ namespace OpenSim
|
||||||
if (args[i] == "-realphysx")
|
if (args[i] == "-realphysx")
|
||||||
{
|
{
|
||||||
physicsEngine = "RealPhysX";
|
physicsEngine = "RealPhysX";
|
||||||
allowFlying = true;
|
|
||||||
}
|
}
|
||||||
if (args[i] == "-bulletX")
|
if (args[i] == "-bulletX")
|
||||||
{
|
{
|
||||||
physicsEngine = "BulletXEngine";
|
physicsEngine = "BulletXEngine";
|
||||||
allowFlying = true;
|
|
||||||
}
|
}
|
||||||
if (args[i] == "-ode")
|
if (args[i] == "-ode")
|
||||||
{
|
{
|
||||||
physicsEngine = "OpenDynamicsEngine";
|
physicsEngine = "OpenDynamicsEngine";
|
||||||
allowFlying = true;
|
|
||||||
}
|
}
|
||||||
if (args[i] == "-localasset")
|
if (args[i] == "-localasset")
|
||||||
{
|
{
|
||||||
|
@ -108,11 +101,9 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
|
|
||||||
OpenSimMain sim = new OpenSimMain(sandBoxMode, startLoginServer, physicsEngine, useConfigFile, silent, configFile);
|
OpenSimMain sim = new OpenSimMain(sandBoxMode, startLoginServer, physicsEngine, useConfigFile, silent, configFile);
|
||||||
// OpenSimRoot.Instance.Application = sim;
|
|
||||||
sim.m_sandbox = sandBoxMode;
|
|
||||||
sim.user_accounts = userAccounts;
|
sim.user_accounts = userAccounts;
|
||||||
sim.gridLocalAsset = gridLocalAsset;
|
sim.gridLocalAsset = gridLocalAsset;
|
||||||
ScenePresence.PhysicsEngineFlying = allowFlying;
|
|
||||||
|
|
||||||
sim.StartUp();
|
sim.StartUp();
|
||||||
|
|
||||||
|
|
|
@ -119,9 +119,6 @@ namespace OpenSim
|
||||||
|
|
||||||
startuptime = DateTime.Now;
|
startuptime = DateTime.Now;
|
||||||
|
|
||||||
this.m_physicsManager = new PhysicsPluginManager();
|
|
||||||
this.m_physicsManager.LoadPlugins();
|
|
||||||
|
|
||||||
this.SetupScene();
|
this.SetupScene();
|
||||||
|
|
||||||
m_log.Verbose("Main.cs:Startup() - Initialising HTTP server");
|
m_log.Verbose("Main.cs:Startup() - Initialising HTTP server");
|
||||||
|
@ -231,7 +228,9 @@ namespace OpenSim
|
||||||
scene.LoadStorageDLL("OpenSim.Region.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded.
|
scene.LoadStorageDLL("OpenSim.Region.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded.
|
||||||
scene.LoadWorldMap();
|
scene.LoadWorldMap();
|
||||||
|
|
||||||
scene.PhysScene = this.m_physicsManager.GetPhysicsScene( this.m_physicsEngine );
|
PhysicsScene physicsScene = GetPhysicsScene( m_physicsEngine );
|
||||||
|
|
||||||
|
scene.PhysScene = physicsScene;
|
||||||
scene.PhysScene.SetTerrain(scene.Terrain.getHeights1D());
|
scene.PhysScene.SetTerrain(scene.Terrain.getHeights1D());
|
||||||
scene.LoadPrimsFromStorage();
|
scene.LoadPrimsFromStorage();
|
||||||
|
|
||||||
|
@ -254,6 +253,14 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static PhysicsScene GetPhysicsScene(string physicsEngine)
|
||||||
|
{
|
||||||
|
PhysicsPluginManager physicsPluginManager;
|
||||||
|
physicsPluginManager = new PhysicsPluginManager();
|
||||||
|
physicsPluginManager.LoadPlugins();
|
||||||
|
return physicsPluginManager.GetPhysicsScene( physicsEngine );
|
||||||
|
}
|
||||||
|
|
||||||
private class SimStatusHandler : IStreamHandler
|
private class SimStatusHandler : IStreamHandler
|
||||||
{
|
{
|
||||||
public byte[] Handle(string path, Stream request)
|
public byte[] Handle(string path, Stream request)
|
||||||
|
@ -359,7 +366,7 @@ namespace OpenSim
|
||||||
this.gridLocalAsset = Convert.ToBoolean(attri);
|
this.gridLocalAsset = Convert.ToBoolean(attri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
attri = "";
|
attri = "";
|
||||||
attri = configData.GetAttribute("PhysicsEngine");
|
attri = configData.GetAttribute("PhysicsEngine");
|
||||||
switch (attri)
|
switch (attri)
|
||||||
|
|
|
@ -42,7 +42,6 @@ namespace OpenSim.Region.ClientStack
|
||||||
{
|
{
|
||||||
public class RegionApplicationBase
|
public class RegionApplicationBase
|
||||||
{
|
{
|
||||||
protected PhysicsPluginManager m_physicsManager;
|
|
||||||
protected AssetCache AssetCache;
|
protected AssetCache AssetCache;
|
||||||
protected InventoryCache InventoryCache;
|
protected InventoryCache InventoryCache;
|
||||||
protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>();
|
protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>();
|
||||||
|
|
Loading…
Reference in New Issue