diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs (renamed from OpenSim/OpenSim/OpenSimMain.cs) | 62 |
1 files changed, 32 insertions, 30 deletions
diff --git a/OpenSim/OpenSim/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index b7ec9e6..fcb2493 100644 --- a/OpenSim/OpenSim/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -38,30 +38,34 @@ using System.Collections; | |||
38 | using System.Collections.Generic; | 38 | using System.Collections.Generic; |
39 | using libsecondlife; | 39 | using libsecondlife; |
40 | using libsecondlife.Packets; | 40 | using libsecondlife.Packets; |
41 | using OpenSim.Region; | 41 | using OpenSim.Region.Environment; |
42 | using OpenSim.Region.Scenes; | 42 | using OpenSim.Region.Environment.Scenes; |
43 | using OpenSim.Terrain; | 43 | using OpenSim.Region.Terrain; |
44 | using OpenSim.Framework.Interfaces; | 44 | using OpenSim.Framework.Interfaces; |
45 | using OpenSim.Framework.Data; | ||
46 | |||
45 | using OpenSim.Framework.Types; | 47 | using OpenSim.Framework.Types; |
46 | using OpenSim.Framework; | 48 | using OpenSim.Framework; |
47 | using OpenSim.Assets; | 49 | using OpenSim.Assets; |
48 | using OpenSim.Caches; | 50 | using OpenSim.Region.Caches; |
49 | using OpenSim.Framework.Console; | 51 | using OpenSim.Framework.Console; |
50 | using OpenSim.Physics.Manager; | 52 | using OpenSim.Physics.Manager; |
51 | using Nwc.XmlRpc; | 53 | using Nwc.XmlRpc; |
52 | using OpenSim.Servers; | 54 | using OpenSim.Framework.Servers; |
53 | using OpenSim.GenericConfig; | 55 | using OpenSim.GenericConfig; |
54 | using OpenGrid.Framework.Communications; | 56 | using OpenSim.Framework.Communications; |
55 | using OpenSim.LocalCommunications; | 57 | using OpenSim.Region.Communications.OGS1; |
56 | using OpenGrid.Framework.Communications.OGS1; | 58 | using OpenSim.Region.Communications.Local; |
59 | |||
60 | using OpenSim.Region.ClientStack; | ||
57 | 61 | ||
58 | namespace OpenSim | 62 | namespace OpenSim |
59 | { | 63 | { |
60 | 64 | ||
61 | public class OpenSimMain : RegionApplicationBase, conscmd_callback | 65 | public class OpenSimMain : RegionApplicationBase, conscmd_callback |
62 | { | 66 | { |
63 | // private CheckSumServer checkServer; | ||
64 | protected CommunicationsManager commsManager; | 67 | protected CommunicationsManager commsManager; |
68 | // private CheckSumServer checkServer; | ||
65 | 69 | ||
66 | private bool m_silent; | 70 | private bool m_silent; |
67 | private string m_logFilename = "region-console-" + Guid.NewGuid().ToString() + ".log"; | 71 | private string m_logFilename = "region-console-" + Guid.NewGuid().ToString() + ".log"; |
@@ -102,19 +106,17 @@ namespace OpenSim | |||
102 | 106 | ||
103 | ClientView.TerrainManager = new TerrainManager(new SecondLife()); | 107 | ClientView.TerrainManager = new TerrainManager(new SecondLife()); |
104 | 108 | ||
105 | CommunicationsLocal sandboxCommunications = null; | ||
106 | if (m_sandbox) | 109 | if (m_sandbox) |
107 | { | 110 | { |
108 | this.SetupLocalGridServers(); | 111 | this.SetupLocalGridServers(); |
109 | // this.checkServer = new CheckSumServer(12036); | 112 | // this.checkServer = new CheckSumServer(12036); |
110 | // this.checkServer.ServerListener(); | 113 | // this.checkServer.ServerListener(); |
111 | sandboxCommunications = new CommunicationsLocal(this.serversData); | 114 | this.commsManager = new CommunicationsLocal(this.serversData); |
112 | this.commsManager = sandboxCommunications; | ||
113 | } | 115 | } |
114 | else | 116 | else |
115 | { | 117 | { |
116 | this.SetupRemoteGridServers(); | 118 | this.SetupRemoteGridServers(); |
117 | this.commsManager = new GridCommsManager(this.serversData); | 119 | this.commsManager = new CommunicationsOGS1(this.serversData); |
118 | } | 120 | } |
119 | 121 | ||
120 | startuptime = DateTime.Now; | 122 | startuptime = DateTime.Now; |
@@ -132,7 +134,7 @@ namespace OpenSim | |||
132 | 134 | ||
133 | if (m_sandbox) | 135 | if (m_sandbox) |
134 | { | 136 | { |
135 | httpServer.AddXmlRPCHandler("login_to_simulator", sandboxCommunications.UserServices.XmlRpcLoginMethod); | 137 | httpServer.AddXmlRPCHandler("login_to_simulator", ((CommunicationsLocal)this.commsManager).UserServices.XmlRpcLoginMethod); |
136 | } | 138 | } |
137 | 139 | ||
138 | //Start http server | 140 | //Start http server |
@@ -152,7 +154,7 @@ namespace OpenSim | |||
152 | { | 154 | { |
153 | try | 155 | try |
154 | { | 156 | { |
155 | AssetCache = new AssetCache("OpenSim.GridInterfaces.Local.dll", this.serversData.AssetURL, this.serversData.AssetSendKey); | 157 | AssetCache = new AssetCache("OpenSim.Region.GridInterfaces.Local.dll", this.serversData.AssetURL, this.serversData.AssetSendKey); |
156 | InventoryCache = new InventoryCache(); | 158 | InventoryCache = new InventoryCache(); |
157 | } | 159 | } |
158 | catch (Exception e) | 160 | catch (Exception e) |
@@ -167,7 +169,7 @@ namespace OpenSim | |||
167 | { | 169 | { |
168 | try | 170 | try |
169 | { | 171 | { |
170 | AssetCache = new AssetCache("OpenSim.GridInterfaces.Remote.dll", this.serversData.AssetURL, this.serversData.AssetSendKey); | 172 | AssetCache = new AssetCache("OpenSim.Region.GridInterfaces.Remote.dll", this.serversData.AssetURL, this.serversData.AssetSendKey); |
171 | InventoryCache = new InventoryCache(); | 173 | InventoryCache = new InventoryCache(); |
172 | } | 174 | } |
173 | catch (Exception e) | 175 | catch (Exception e) |
@@ -241,14 +243,21 @@ namespace OpenSim | |||
241 | 243 | ||
242 | udpServer.LocalWorld = LocalWorld; | 244 | udpServer.LocalWorld = LocalWorld; |
243 | 245 | ||
244 | LocalWorld.LoadStorageDLL("OpenSim.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded. | 246 | LocalWorld.LoadStorageDLL("OpenSim.Region.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded. |
245 | LocalWorld.LoadWorldMap(); | 247 | LocalWorld.LoadWorldMap(); |
246 | 248 | ||
247 | m_log.Verbose( "Main.cs:Startup() - Starting up messaging system"); | 249 | m_log.Verbose( "Main.cs:Startup() - Starting up messaging system"); |
248 | LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine); | 250 | LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine); |
249 | LocalWorld.PhysScene.SetTerrain(LocalWorld.Terrain.getHeights1D()); | 251 | LocalWorld.PhysScene.SetTerrain(LocalWorld.Terrain.getHeights1D()); |
250 | LocalWorld.LoadPrimsFromStorage(); | 252 | LocalWorld.LoadPrimsFromStorage(); |
251 | LocalWorld.localStorage.LoadParcels((ILocalStorageParcelReceiver)LocalWorld.parcelManager); | 253 | |
254 | //Master Avatar Setup | ||
255 | UserProfileData masterAvatar = commsManager.UserServer.SetupMasterUser(LocalWorld.RegionInfo.MasterAvatarFirstName, LocalWorld.RegionInfo.MasterAvatarLastName, LocalWorld.RegionInfo.MasterAvatarSandboxPassword); | ||
256 | if (masterAvatar != null) | ||
257 | { | ||
258 | LocalWorld.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; | ||
259 | LocalWorld.localStorage.LoadParcels((ILocalStorageParcelReceiver)LocalWorld.parcelManager); | ||
260 | } | ||
252 | 261 | ||
253 | 262 | ||
254 | LocalWorld.StartTimer(); | 263 | LocalWorld.StartTimer(); |
@@ -358,23 +367,23 @@ namespace OpenSim | |||
358 | case "": | 367 | case "": |
359 | this.m_physicsEngine = "basicphysics"; | 368 | this.m_physicsEngine = "basicphysics"; |
360 | configData.SetAttribute("PhysicsEngine", "basicphysics"); | 369 | configData.SetAttribute("PhysicsEngine", "basicphysics"); |
361 | OpenSim.Region.Scenes.ScenePresence.PhysicsEngineFlying = false; | 370 | OpenSim.Region.Environment.Scenes.ScenePresence.PhysicsEngineFlying = false; |
362 | break; | 371 | break; |
363 | 372 | ||
364 | case "basicphysics": | 373 | case "basicphysics": |
365 | this.m_physicsEngine = "basicphysics"; | 374 | this.m_physicsEngine = "basicphysics"; |
366 | configData.SetAttribute("PhysicsEngine", "basicphysics"); | 375 | configData.SetAttribute("PhysicsEngine", "basicphysics"); |
367 | OpenSim.Region.Scenes.ScenePresence.PhysicsEngineFlying = false; | 376 | OpenSim.Region.Environment.Scenes.ScenePresence.PhysicsEngineFlying = false; |
368 | break; | 377 | break; |
369 | 378 | ||
370 | case "RealPhysX": | 379 | case "RealPhysX": |
371 | this.m_physicsEngine = "RealPhysX"; | 380 | this.m_physicsEngine = "RealPhysX"; |
372 | OpenSim.Region.Scenes.ScenePresence.PhysicsEngineFlying = true; | 381 | OpenSim.Region.Environment.Scenes.ScenePresence.PhysicsEngineFlying = true; |
373 | break; | 382 | break; |
374 | 383 | ||
375 | case "OpenDynamicsEngine": | 384 | case "OpenDynamicsEngine": |
376 | this.m_physicsEngine = "OpenDynamicsEngine"; | 385 | this.m_physicsEngine = "OpenDynamicsEngine"; |
377 | OpenSim.Region.Scenes.ScenePresence.PhysicsEngineFlying = true; | 386 | OpenSim.Region.Environment.Scenes.ScenePresence.PhysicsEngineFlying = true; |
378 | break; | 387 | break; |
379 | } | 388 | } |
380 | 389 | ||
@@ -433,13 +442,6 @@ namespace OpenSim | |||
433 | } | 442 | } |
434 | break; | 443 | break; |
435 | 444 | ||
436 | case "script": | ||
437 | for (int i = 0; i < m_localWorld.Count; i++) | ||
438 | { | ||
439 | ((Scene)m_localWorld[i]).scriptManager.RunScriptCmd(cmdparams); | ||
440 | } | ||
441 | break; | ||
442 | |||
443 | case "shutdown": | 445 | case "shutdown": |
444 | Shutdown(); | 446 | Shutdown(); |
445 | break; | 447 | break; |
@@ -463,7 +465,7 @@ namespace OpenSim | |||
463 | m_log.Error( "That is " + (DateTime.Now - startuptime).ToString()); | 465 | m_log.Error( "That is " + (DateTime.Now - startuptime).ToString()); |
464 | break; | 466 | break; |
465 | case "users": | 467 | case "users": |
466 | OpenSim.Region.Scenes.ScenePresence TempAv; | 468 | OpenSim.Region.Environment.Scenes.ScenePresence TempAv; |
467 | 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")); | 469 | 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")); |
468 | /* foreach (libsecondlife.LLUUID UUID in LocalWorld.Entities.Keys) | 470 | /* foreach (libsecondlife.LLUUID UUID in LocalWorld.Entities.Keys) |
469 | { | 471 | { |