aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
authorlbsa712007-07-16 18:37:31 +0000
committerlbsa712007-07-16 18:37:31 +0000
commite6dea73d1f7bdc954b250b8cb03370264e11f635 (patch)
tree80ae7559bfb854961d2161115da790d425dad9eb /OpenSim/Region/Application
parent* working on RegionApplicationBase (diff)
downloadopensim-SC-e6dea73d1f7bdc954b250b8cb03370264e11f635.zip
opensim-SC-e6dea73d1f7bdc954b250b8cb03370264e11f635.tar.gz
opensim-SC-e6dea73d1f7bdc954b250b8cb03370264e11f635.tar.bz2
opensim-SC-e6dea73d1f7bdc954b250b8cb03370264e11f635.tar.xz
* Removed some superfluous assigns
* Moved physics plugin scene creation into local scope
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r--OpenSim/Region/Application/Application.cs13
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs17
2 files changed, 14 insertions, 16 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs
index 666be33..a47ba48 100644
--- a/OpenSim/Region/Application/Application.cs
+++ b/OpenSim/Region/Application/Application.cs
@@ -57,11 +57,7 @@ namespace OpenSim
57 sandBoxMode = true; 57 sandBoxMode = true;
58 startLoginServer = true; 58 startLoginServer = true;
59 } 59 }
60 /* 60
61 if (args[i] == "-loginserver")
62 {
63 startLoginServer = true;
64 }*/
65 if (args[i] == "-accounts") 61 if (args[i] == "-accounts")
66 { 62 {
67 userAccounts = true; 63 userAccounts = true;
@@ -69,17 +65,14 @@ namespace OpenSim
69 if (args[i] == "-realphysx") 65 if (args[i] == "-realphysx")
70 { 66 {
71 physicsEngine = "RealPhysX"; 67 physicsEngine = "RealPhysX";
72 allowFlying = true;
73 } 68 }
74 if (args[i] == "-bulletX") 69 if (args[i] == "-bulletX")
75 { 70 {
76 physicsEngine = "BulletXEngine"; 71 physicsEngine = "BulletXEngine";
77 allowFlying = true;
78 } 72 }
79 if (args[i] == "-ode") 73 if (args[i] == "-ode")
80 { 74 {
81 physicsEngine = "OpenDynamicsEngine"; 75 physicsEngine = "OpenDynamicsEngine";
82 allowFlying = true;
83 } 76 }
84 if (args[i] == "-localasset") 77 if (args[i] == "-localasset")
85 { 78 {
@@ -108,11 +101,9 @@ namespace OpenSim
108 } 101 }
109 102
110 OpenSimMain sim = new OpenSimMain(sandBoxMode, startLoginServer, physicsEngine, useConfigFile, silent, configFile); 103 OpenSimMain sim = new OpenSimMain(sandBoxMode, startLoginServer, physicsEngine, useConfigFile, silent, configFile);
111 // OpenSimRoot.Instance.Application = sim; 104
112 sim.m_sandbox = sandBoxMode;
113 sim.user_accounts = userAccounts; 105 sim.user_accounts = userAccounts;
114 sim.gridLocalAsset = gridLocalAsset; 106 sim.gridLocalAsset = gridLocalAsset;
115 ScenePresence.PhysicsEngineFlying = allowFlying;
116 107
117 sim.StartUp(); 108 sim.StartUp();
118 109
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index d7bed31..5409fea 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -119,9 +119,6 @@ namespace OpenSim
119 119
120 startuptime = DateTime.Now; 120 startuptime = DateTime.Now;
121 121
122 this.m_physicsManager = new PhysicsPluginManager();
123 this.m_physicsManager.LoadPlugins();
124
125 this.SetupScene(); 122 this.SetupScene();
126 123
127 m_log.Verbose("Main.cs:Startup() - Initialising HTTP server"); 124 m_log.Verbose("Main.cs:Startup() - Initialising HTTP server");
@@ -231,7 +228,9 @@ namespace OpenSim
231 scene.LoadStorageDLL("OpenSim.Region.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded. 228 scene.LoadStorageDLL("OpenSim.Region.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded.
232 scene.LoadWorldMap(); 229 scene.LoadWorldMap();
233 230
234 scene.PhysScene = this.m_physicsManager.GetPhysicsScene( this.m_physicsEngine ); 231 PhysicsScene physicsScene = GetPhysicsScene( m_physicsEngine );
232
233 scene.PhysScene = physicsScene;
235 scene.PhysScene.SetTerrain(scene.Terrain.getHeights1D()); 234 scene.PhysScene.SetTerrain(scene.Terrain.getHeights1D());
236 scene.LoadPrimsFromStorage(); 235 scene.LoadPrimsFromStorage();
237 236
@@ -254,6 +253,14 @@ namespace OpenSim
254 } 253 }
255 } 254 }
256 255
256 private static PhysicsScene GetPhysicsScene(string physicsEngine)
257 {
258 PhysicsPluginManager physicsPluginManager;
259 physicsPluginManager = new PhysicsPluginManager();
260 physicsPluginManager.LoadPlugins();
261 return physicsPluginManager.GetPhysicsScene( physicsEngine );
262 }
263
257 private class SimStatusHandler : IStreamHandler 264 private class SimStatusHandler : IStreamHandler
258 { 265 {
259 public byte[] Handle(string path, Stream request) 266 public byte[] Handle(string path, Stream request)
@@ -359,7 +366,7 @@ namespace OpenSim
359 this.gridLocalAsset = Convert.ToBoolean(attri); 366 this.gridLocalAsset = Convert.ToBoolean(attri);
360 } 367 }
361 368
362 369
363 attri = ""; 370 attri = "";
364 attri = configData.GetAttribute("PhysicsEngine"); 371 attri = configData.GetAttribute("PhysicsEngine");
365 switch (attri) 372 switch (attri)