diff options
* Optimized usings (the 'LL ate my scripts' commit)
* added some licensing info
Diffstat (limited to 'OpenSim/Region/Application/OpenSimMain.cs')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 52 |
1 files changed, 19 insertions, 33 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 097d1cc..e976fe3 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -27,37 +27,23 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.Text; | ||
31 | using System.IO; | 30 | using System.IO; |
32 | using System.Threading; | ||
33 | using System.Net; | ||
34 | using System.Net.Sockets; | ||
35 | using System.Timers; | ||
36 | using System.Reflection; | ||
37 | using System.Collections; | ||
38 | using System.Collections.Generic; | ||
39 | using libsecondlife; | 31 | using libsecondlife; |
40 | using libsecondlife.Packets; | ||
41 | using OpenSim.Region.Environment; | ||
42 | using OpenSim.Region.Environment.Scenes; | ||
43 | using OpenSim.Region.Terrain; | ||
44 | using OpenSim.Framework.Interfaces; | ||
45 | using OpenSim.Framework.Data; | ||
46 | |||
47 | using OpenSim.Framework.Types; | ||
48 | using OpenSim.Framework; | ||
49 | using OpenSim.Assets; | 32 | using OpenSim.Assets; |
50 | using OpenSim.Region.Caches; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Framework.Communications; | ||
51 | using OpenSim.Framework.Console; | 35 | using OpenSim.Framework.Console; |
52 | using OpenSim.Physics.Manager; | 36 | using OpenSim.Framework.Data; |
53 | using Nwc.XmlRpc; | 37 | using OpenSim.Framework.Interfaces; |
54 | using OpenSim.Framework.Servers; | 38 | using OpenSim.Framework.Servers; |
39 | using OpenSim.Framework.Types; | ||
55 | using OpenSim.GenericConfig; | 40 | using OpenSim.GenericConfig; |
56 | using OpenSim.Framework.Communications; | 41 | using OpenSim.Physics.Manager; |
57 | using OpenSim.Region.Communications.OGS1; | 42 | using OpenSim.Region.Caches; |
58 | using OpenSim.Region.Communications.Local; | ||
59 | |||
60 | using OpenSim.Region.ClientStack; | 43 | using OpenSim.Region.ClientStack; |
44 | using OpenSim.Region.Communications.Local; | ||
45 | using OpenSim.Region.Communications.OGS1; | ||
46 | using OpenSim.Region.Environment.Scenes; | ||
61 | 47 | ||
62 | namespace OpenSim | 48 | namespace OpenSim |
63 | { | 49 | { |
@@ -96,7 +82,7 @@ namespace OpenSim | |||
96 | } | 82 | } |
97 | 83 | ||
98 | m_log = new LogBase(m_logFilename, "Region", this, m_silent); | 84 | m_log = new LogBase(m_logFilename, "Region", this, m_silent); |
99 | OpenSim.Framework.Console.MainLog.Instance = m_log; | 85 | MainLog.Instance = m_log; |
100 | 86 | ||
101 | m_log.Verbose( "Main.cs:Startup() - Loading configuration"); | 87 | m_log.Verbose( "Main.cs:Startup() - Loading configuration"); |
102 | this.serversData.InitConfig(this.m_sandbox, this.localConfig); | 88 | this.serversData.InitConfig(this.m_sandbox, this.localConfig); |
@@ -121,7 +107,7 @@ namespace OpenSim | |||
121 | 107 | ||
122 | startuptime = DateTime.Now; | 108 | startuptime = DateTime.Now; |
123 | 109 | ||
124 | this.physManager = new OpenSim.Physics.Manager.PhysicsManager(); | 110 | this.physManager = new PhysicsManager(); |
125 | this.physManager.LoadPlugins(); | 111 | this.physManager.LoadPlugins(); |
126 | 112 | ||
127 | this.SetupHttpListener(); | 113 | this.SetupHttpListener(); |
@@ -187,12 +173,12 @@ namespace OpenSim | |||
187 | RegionInfo regionDat = new RegionInfo(); | 173 | RegionInfo regionDat = new RegionInfo(); |
188 | AuthenticateSessionsBase authenBase; | 174 | AuthenticateSessionsBase authenBase; |
189 | 175 | ||
190 | string path = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "Regions"); | 176 | string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Regions"); |
191 | string[] configFiles = Directory.GetFiles(path, "*.xml"); | 177 | string[] configFiles = Directory.GetFiles(path, "*.xml"); |
192 | 178 | ||
193 | if (configFiles.Length == 0) | 179 | if (configFiles.Length == 0) |
194 | { | 180 | { |
195 | string path2 = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "Regions"); | 181 | string path2 = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Regions"); |
196 | string path3 = Path.Combine(path2, "default.xml"); | 182 | string path3 = Path.Combine(path2, "default.xml"); |
197 | Console.WriteLine("Creating default region config file"); | 183 | Console.WriteLine("Creating default region config file"); |
198 | //TODO create default region | 184 | //TODO create default region |
@@ -361,23 +347,23 @@ namespace OpenSim | |||
361 | case "": | 347 | case "": |
362 | this.m_physicsEngine = "basicphysics"; | 348 | this.m_physicsEngine = "basicphysics"; |
363 | configData.SetAttribute("PhysicsEngine", "basicphysics"); | 349 | configData.SetAttribute("PhysicsEngine", "basicphysics"); |
364 | OpenSim.Region.Environment.Scenes.ScenePresence.PhysicsEngineFlying = false; | 350 | ScenePresence.PhysicsEngineFlying = false; |
365 | break; | 351 | break; |
366 | 352 | ||
367 | case "basicphysics": | 353 | case "basicphysics": |
368 | this.m_physicsEngine = "basicphysics"; | 354 | this.m_physicsEngine = "basicphysics"; |
369 | configData.SetAttribute("PhysicsEngine", "basicphysics"); | 355 | configData.SetAttribute("PhysicsEngine", "basicphysics"); |
370 | OpenSim.Region.Environment.Scenes.ScenePresence.PhysicsEngineFlying = false; | 356 | ScenePresence.PhysicsEngineFlying = false; |
371 | break; | 357 | break; |
372 | 358 | ||
373 | case "RealPhysX": | 359 | case "RealPhysX": |
374 | this.m_physicsEngine = "RealPhysX"; | 360 | this.m_physicsEngine = "RealPhysX"; |
375 | OpenSim.Region.Environment.Scenes.ScenePresence.PhysicsEngineFlying = true; | 361 | ScenePresence.PhysicsEngineFlying = true; |
376 | break; | 362 | break; |
377 | 363 | ||
378 | case "OpenDynamicsEngine": | 364 | case "OpenDynamicsEngine": |
379 | this.m_physicsEngine = "OpenDynamicsEngine"; | 365 | this.m_physicsEngine = "OpenDynamicsEngine"; |
380 | OpenSim.Region.Environment.Scenes.ScenePresence.PhysicsEngineFlying = true; | 366 | ScenePresence.PhysicsEngineFlying = true; |
381 | break; | 367 | break; |
382 | } | 368 | } |
383 | 369 | ||
@@ -459,7 +445,7 @@ namespace OpenSim | |||
459 | m_log.Error( "That is " + (DateTime.Now - startuptime).ToString()); | 445 | m_log.Error( "That is " + (DateTime.Now - startuptime).ToString()); |
460 | break; | 446 | break; |
461 | case "users": | 447 | case "users": |
462 | OpenSim.Region.Environment.Scenes.ScenePresence TempAv; | 448 | ScenePresence TempAv; |
463 | m_log.Error( String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}", "Firstname", "Lastname", "Agent ID", "Session ID", "Circuit", "IP")); | 449 | m_log.Error( String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}", "Firstname", "Lastname", "Agent ID", "Session ID", "Circuit", "IP")); |
464 | /* foreach (libsecondlife.LLUUID UUID in LocalWorld.Entities.Keys) | 450 | /* foreach (libsecondlife.LLUUID UUID in LocalWorld.Entities.Keys) |
465 | { | 451 | { |