diff options
author | lbsa71 | 2007-03-28 05:27:20 +0000 |
---|---|---|
committer | lbsa71 | 2007-03-28 05:27:20 +0000 |
commit | d66ef8f428b763fca3610869c85adb55aef5d9e5 (patch) | |
tree | d3b15df4b9e31b9c186fa7ea560be283c94d4799 /OpenSim | |
parent | Who dropped my child_agent flag? It returns (diff) | |
download | opensim-SC-d66ef8f428b763fca3610869c85adb55aef5d9e5.zip opensim-SC-d66ef8f428b763fca3610869c85adb55aef5d9e5.tar.gz opensim-SC-d66ef8f428b763fca3610869c85adb55aef5d9e5.tar.bz2 opensim-SC-d66ef8f428b763fca3610869c85adb55aef5d9e5.tar.xz |
* worked a little bit more on straigthening the startup procedure out
Diffstat (limited to '')
-rw-r--r-- | OpenSim.RegionServer/OpenSimMain.cs | 78 | ||||
-rw-r--r-- | OpenSim.RegionServer/OpenSimRoot.cs | 15 | ||||
-rw-r--r-- | OpenSim.sln | 165 | ||||
-rw-r--r-- | OpenSim/RegionServer.cs | 55 |
4 files changed, 140 insertions, 173 deletions
diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs index d6453e2..497b801 100644 --- a/OpenSim.RegionServer/OpenSimMain.cs +++ b/OpenSim.RegionServer/OpenSimMain.cs | |||
@@ -63,42 +63,64 @@ namespace OpenSim | |||
63 | 63 | ||
64 | private System.Timers.Timer timer1 = new System.Timers.Timer(); | 64 | private System.Timers.Timer timer1 = new System.Timers.Timer(); |
65 | private string ConfigDll = "OpenSim.Config.SimConfigDb4o.dll"; | 65 | private string ConfigDll = "OpenSim.Config.SimConfigDb4o.dll"; |
66 | public string _physicsEngine = "basicphysics"; | 66 | public string m_physicsEngine; |
67 | public bool sandbox = false; | 67 | public bool m_sandbox = false; |
68 | public bool loginserver = false; | 68 | public bool m_loginserver; |
69 | 69 | ||
70 | protected ConsoleBase m_console; | 70 | protected ConsoleBase m_console; |
71 | 71 | ||
72 | public OpenSimMain() | 72 | public OpenSimMain( bool sandBoxMode, bool startLoginServer, string physicsEngine ) |
73 | { | 73 | { |
74 | m_sandbox = sandBoxMode; | ||
75 | m_loginserver = startLoginServer; | ||
76 | m_physicsEngine = physicsEngine; | ||
77 | |||
74 | m_console = new ConsoleBase("region-console.log", "Region", this); | 78 | m_console = new ConsoleBase("region-console.log", "Region", this); |
75 | OpenSim.Framework.Console.MainConsole.Instance = m_console; | 79 | OpenSim.Framework.Console.MainConsole.Instance = m_console; |
76 | } | 80 | } |
77 | 81 | ||
78 | public override void StartUp() | 82 | public override void StartUp() |
79 | { | 83 | { |
84 | OpenSimRoot.Instance.GridServers = new Grid(); | ||
85 | if ( m_sandbox ) | ||
86 | { | ||
87 | OpenSimRoot.Instance.GridServers.AssetDll = "OpenSim.GridInterfaces.Local.dll"; | ||
88 | OpenSimRoot.Instance.GridServers.GridDll = "OpenSim.GridInterfaces.Local.dll"; | ||
89 | |||
90 | m_console.WriteLine("Starting in Sandbox mode"); | ||
91 | } | ||
92 | else | ||
93 | { | ||
94 | OpenSimRoot.Instance.GridServers.AssetDll = "OpenSim.GridInterfaces.Remote.dll"; | ||
95 | OpenSimRoot.Instance.GridServers.GridDll = "OpenSim.GridInterfaces.Remote.dll"; | ||
96 | |||
97 | m_console.WriteLine("Starting in Grid mode"); | ||
98 | } | ||
99 | |||
100 | OpenSimRoot.Instance.GridServers.Initialise(); | ||
101 | |||
80 | OpenSimRoot.Instance.startuptime = DateTime.Now; | 102 | OpenSimRoot.Instance.startuptime = DateTime.Now; |
81 | 103 | ||
82 | OpenSimRoot.Instance.AssetCache = new AssetCache(OpenSimRoot.Instance.GridServers.AssetServer); | 104 | OpenSimRoot.Instance.AssetCache = new AssetCache(OpenSimRoot.Instance.GridServers.AssetServer); |
83 | OpenSimRoot.Instance.InventoryCache = new InventoryCache(); | 105 | OpenSimRoot.Instance.InventoryCache = new InventoryCache(); |
84 | 106 | ||
85 | // We check our local database first, then the grid for config options | 107 | // We check our local database first, then the grid for config options |
86 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:Startup() - Loading configuration"); | 108 | m_console.WriteLine("Main.cs:Startup() - Loading configuration"); |
87 | OpenSimRoot.Instance.Cfg = this.LoadConfigDll(this.ConfigDll); | 109 | OpenSimRoot.Instance.Cfg = this.LoadConfigDll(this.ConfigDll); |
88 | OpenSimRoot.Instance.Cfg.InitConfig(this.sandbox); | 110 | OpenSimRoot.Instance.Cfg.InitConfig(this.m_sandbox); |
89 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:Startup() - Contacting gridserver"); | 111 | m_console.WriteLine("Main.cs:Startup() - Contacting gridserver"); |
90 | OpenSimRoot.Instance.Cfg.LoadFromGrid(); | 112 | OpenSimRoot.Instance.Cfg.LoadFromGrid(); |
91 | 113 | ||
92 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:Startup() - We are " + OpenSimRoot.Instance.Cfg.RegionName + " at " + OpenSimRoot.Instance.Cfg.RegionLocX.ToString() + "," + OpenSimRoot.Instance.Cfg.RegionLocY.ToString()); | 114 | m_console.WriteLine("Main.cs:Startup() - We are " + OpenSimRoot.Instance.Cfg.RegionName + " at " + OpenSimRoot.Instance.Cfg.RegionLocX.ToString() + "," + OpenSimRoot.Instance.Cfg.RegionLocY.ToString()); |
93 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Initialising world"); | 115 | m_console.WriteLine("Initialising world"); |
94 | OpenSimRoot.Instance.LocalWorld = new World(OpenSimRoot.Instance.ClientThreads, OpenSimRoot.Instance.Cfg.RegionHandle, OpenSimRoot.Instance.Cfg.RegionName, OpenSimRoot.Instance.Cfg); | 116 | OpenSimRoot.Instance.LocalWorld = new World(OpenSimRoot.Instance.ClientThreads, OpenSimRoot.Instance.Cfg.RegionHandle, OpenSimRoot.Instance.Cfg.RegionName, OpenSimRoot.Instance.Cfg); |
95 | OpenSimRoot.Instance.LocalWorld.LandMap = OpenSimRoot.Instance.Cfg.LoadWorld(); | 117 | OpenSimRoot.Instance.LocalWorld.LandMap = OpenSimRoot.Instance.Cfg.LoadWorld(); |
96 | 118 | ||
97 | this.physManager = new OpenSim.Physics.Manager.PhysicsManager(); | 119 | this.physManager = new OpenSim.Physics.Manager.PhysicsManager(); |
98 | this.physManager.LoadPlugins(); | 120 | this.physManager.LoadPlugins(); |
99 | 121 | ||
100 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:Startup() - Starting up messaging system"); | 122 | m_console.WriteLine("Main.cs:Startup() - Starting up messaging system"); |
101 | OpenSimRoot.Instance.LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this._physicsEngine); //should be reading from the config file what physics engine to use | 123 | OpenSimRoot.Instance.LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine); //should be reading from the config file what physics engine to use |
102 | OpenSimRoot.Instance.LocalWorld.PhysScene.SetTerrain(OpenSimRoot.Instance.LocalWorld.LandMap); | 124 | OpenSimRoot.Instance.LocalWorld.PhysScene.SetTerrain(OpenSimRoot.Instance.LocalWorld.LandMap); |
103 | 125 | ||
104 | OpenSimRoot.Instance.GridServers.AssetServer.SetServerInfo(OpenSimRoot.Instance.Cfg.AssetURL, OpenSimRoot.Instance.Cfg.AssetSendKey); | 126 | OpenSimRoot.Instance.GridServers.AssetServer.SetServerInfo(OpenSimRoot.Instance.Cfg.AssetURL, OpenSimRoot.Instance.Cfg.AssetSendKey); |
@@ -107,20 +129,26 @@ namespace OpenSim | |||
107 | OpenSimRoot.Instance.LocalWorld.LoadStorageDLL("OpenSim.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded. | 129 | OpenSimRoot.Instance.LocalWorld.LoadStorageDLL("OpenSim.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded. |
108 | OpenSimRoot.Instance.LocalWorld.LoadPrimsFromStorage(); | 130 | OpenSimRoot.Instance.LocalWorld.LoadPrimsFromStorage(); |
109 | 131 | ||
110 | if (this.sandbox) | 132 | if ( m_sandbox) |
111 | { | 133 | { |
112 | OpenSimRoot.Instance.AssetCache.LoadDefaultTextureSet(); | 134 | OpenSimRoot.Instance.AssetCache.LoadDefaultTextureSet(); |
113 | } | 135 | } |
114 | 136 | ||
115 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:Startup() - Starting CAPS HTTP server"); | 137 | m_console.WriteLine("Main.cs:Startup() - Starting CAPS HTTP server"); |
116 | OpenSimRoot.Instance.HttpServer = new SimCAPSHTTPServer(OpenSimRoot.Instance.GridServers.GridServer, OpenSimRoot.Instance.Cfg.IPListenPort); | 138 | OpenSimRoot.Instance.HttpServer = new SimCAPSHTTPServer(OpenSimRoot.Instance.GridServers.GridServer, OpenSimRoot.Instance.Cfg.IPListenPort); |
117 | OpenSimRoot.Instance.HttpServer.AddRestHandler("Admin", new AdminWebFront("Admin", OpenSimRoot.Instance.LocalWorld)); | 139 | OpenSimRoot.Instance.HttpServer.AddRestHandler("Admin", new AdminWebFront("Admin", OpenSimRoot.Instance.LocalWorld)); |
118 | 140 | ||
141 | if ( m_loginserver && m_sandbox) | ||
142 | { | ||
143 | LoginServer loginServer = new LoginServer(OpenSimRoot.Instance.GridServers.GridServer, OpenSimRoot.Instance.Cfg.IPListenAddr, OpenSimRoot.Instance.Cfg.IPListenPort); | ||
144 | loginServer.Startup(); | ||
145 | } | ||
146 | |||
147 | MainServerListener(); | ||
148 | |||
119 | timer1.Enabled = true; | 149 | timer1.Enabled = true; |
120 | timer1.Interval = 100; | 150 | timer1.Interval = 100; |
121 | timer1.Elapsed += new ElapsedEventHandler(this.Timer1Tick); | 151 | timer1.Elapsed += new ElapsedEventHandler(this.Timer1Tick); |
122 | |||
123 | MainServerListener(); | ||
124 | } | 152 | } |
125 | 153 | ||
126 | private SimConfig LoadConfigDll(string dllName) | 154 | private SimConfig LoadConfigDll(string dllName) |
@@ -185,21 +213,21 @@ namespace OpenSim | |||
185 | 213 | ||
186 | private void MainServerListener() | 214 | private void MainServerListener() |
187 | { | 215 | { |
188 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:MainServerListener() - New thread started"); | 216 | m_console.WriteLine("Main.cs:MainServerListener() - New thread started"); |
189 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:MainServerListener() - Opening UDP socket on " + OpenSimRoot.Instance.Cfg.IPListenAddr + ":" + OpenSimRoot.Instance.Cfg.IPListenPort); | 217 | m_console.WriteLine("Main.cs:MainServerListener() - Opening UDP socket on " + OpenSimRoot.Instance.Cfg.IPListenAddr + ":" + OpenSimRoot.Instance.Cfg.IPListenPort); |
190 | 218 | ||
191 | ServerIncoming = new IPEndPoint(IPAddress.Any, OpenSimRoot.Instance.Cfg.IPListenPort); | 219 | ServerIncoming = new IPEndPoint(IPAddress.Any, OpenSimRoot.Instance.Cfg.IPListenPort); |
192 | Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); | 220 | Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); |
193 | Server.Bind(ServerIncoming); | 221 | Server.Bind(ServerIncoming); |
194 | 222 | ||
195 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:MainServerListener() - UDP socket bound, getting ready to listen"); | 223 | m_console.WriteLine("Main.cs:MainServerListener() - UDP socket bound, getting ready to listen"); |
196 | 224 | ||
197 | ipeSender = new IPEndPoint(IPAddress.Any, 0); | 225 | ipeSender = new IPEndPoint(IPAddress.Any, 0); |
198 | epSender = (EndPoint)ipeSender; | 226 | epSender = (EndPoint)ipeSender; |
199 | ReceivedData = new AsyncCallback(this.OnReceivedData); | 227 | ReceivedData = new AsyncCallback(this.OnReceivedData); |
200 | Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); | 228 | Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); |
201 | 229 | ||
202 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:MainServerListener() - Listening..."); | 230 | m_console.WriteLine("Main.cs:MainServerListener() - Listening..."); |
203 | 231 | ||
204 | } | 232 | } |
205 | 233 | ||
@@ -236,14 +264,14 @@ namespace OpenSim | |||
236 | 264 | ||
237 | public override void Shutdown() | 265 | public override void Shutdown() |
238 | { | 266 | { |
239 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:Shutdown() - Closing all threads"); | 267 | m_console.WriteLine("Main.cs:Shutdown() - Closing all threads"); |
240 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:Shutdown() - Killing listener thread"); | 268 | m_console.WriteLine("Main.cs:Shutdown() - Killing listener thread"); |
241 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:Shutdown() - Killing clients"); | 269 | m_console.WriteLine("Main.cs:Shutdown() - Killing clients"); |
242 | // IMPLEMENT THIS | 270 | // IMPLEMENT THIS |
243 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:Shutdown() - Closing console and terminating"); | 271 | m_console.WriteLine("Main.cs:Shutdown() - Closing console and terminating"); |
244 | OpenSimRoot.Instance.LocalWorld.Close(); | 272 | OpenSimRoot.Instance.LocalWorld.Close(); |
245 | OpenSimRoot.Instance.GridServers.Close(); | 273 | OpenSimRoot.Instance.GridServers.Close(); |
246 | OpenSim.Framework.Console.MainConsole.Instance.Close(); | 274 | m_console.Close(); |
247 | Environment.Exit(0); | 275 | Environment.Exit(0); |
248 | } | 276 | } |
249 | 277 | ||
@@ -271,7 +299,7 @@ namespace OpenSim | |||
271 | break; | 299 | break; |
272 | 300 | ||
273 | case "shutdown": | 301 | case "shutdown": |
274 | OpenSimRoot.Instance.Shutdown(); | 302 | Shutdown(); |
275 | break; | 303 | break; |
276 | } | 304 | } |
277 | } | 305 | } |
diff --git a/OpenSim.RegionServer/OpenSimRoot.cs b/OpenSim.RegionServer/OpenSimRoot.cs index 3361e5d..1f96c4d 100644 --- a/OpenSim.RegionServer/OpenSimRoot.cs +++ b/OpenSim.RegionServer/OpenSimRoot.cs | |||
@@ -44,20 +44,5 @@ namespace OpenSim | |||
44 | public OpenSimApplication Application; | 44 | public OpenSimApplication Application; |
45 | public bool Sandbox = false; | 45 | public bool Sandbox = false; |
46 | 46 | ||
47 | public void StartUp() | ||
48 | { | ||
49 | if (this.Application != null) | ||
50 | { | ||
51 | this.Application.StartUp(); | ||
52 | } | ||
53 | } | ||
54 | |||
55 | public void Shutdown() | ||
56 | { | ||
57 | if (this.Application != null) | ||
58 | { | ||
59 | this.Application.Shutdown(); | ||
60 | } | ||
61 | } | ||
62 | } | 47 | } |
63 | } | 48 | } |
diff --git a/OpenSim.sln b/OpenSim.sln index 207bbba..5e07615 100644 --- a/OpenSim.sln +++ b/OpenSim.sln | |||
@@ -31,100 +31,73 @@ EndProject | |||
31 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Physics.PhysXPlugin", "OpenSim.Physics\PhysXPlugin\OpenSim.Physics.PhysXPlugin.csproj", "{0EF13F92-86F1-403D-882A-AA9DD4421B32}" | 31 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Physics.PhysXPlugin", "OpenSim.Physics\PhysXPlugin\OpenSim.Physics.PhysXPlugin.csproj", "{0EF13F92-86F1-403D-882A-AA9DD4421B32}" |
32 | EndProject | 32 | EndProject |
33 | Global | 33 | Global |
34 | GlobalSection(SolutionConfigurationPlatforms) = preSolution | 34 | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
35 | Debug|Any CPU = Debug|Any CPU | 35 | Debug|Any CPU = Debug|Any CPU |
36 | Release|Any CPU = Release|Any CPU | 36 | Release|Any CPU = Release|Any CPU |
37 | EndGlobalSection | 37 | EndGlobalSection |
38 | GlobalSection(ProjectDependencies) = postSolution | 38 | GlobalSection(ProjectConfigurationPlatforms) = postSolution |
39 | ({B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}).2 = ({BD7866A4-04BA-47F0-905F-B2359118F5B2}) | 39 | {B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
40 | ({B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}).3 = ({4B0A7290-36C2-4C74-B9B4-07775B031CF2}) | 40 | {B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}.Debug|Any CPU.Build.0 = Debug|Any CPU |
41 | ({A6463B2D-0956-4680-9D03-082199779C66}).5 = ({BD7866A4-04BA-47F0-905F-B2359118F5B2}) | 41 | {B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}.Release|Any CPU.ActiveCfg = Release|Any CPU |
42 | ({A6463B2D-0956-4680-9D03-082199779C66}).6 = ({4B0A7290-36C2-4C74-B9B4-07775B031CF2}) | 42 | {B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}.Release|Any CPU.Build.0 = Release|Any CPU |
43 | ({98EC7DD5-BAB2-4678-AEA1-7C2B27B27BC9}).4 = ({4B0A7290-36C2-4C74-B9B4-07775B031CF2}) | 43 | {4B0A7290-36C2-4C74-B9B4-07775B031CF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
44 | ({76C00C0A-1AEF-49C9-8E4E-19A529B364E8}).3 = ({BD7866A4-04BA-47F0-905F-B2359118F5B2}) | 44 | {4B0A7290-36C2-4C74-B9B4-07775B031CF2}.Debug|Any CPU.Build.0 = Debug|Any CPU |
45 | ({76C00C0A-1AEF-49C9-8E4E-19A529B364E8}).4 = ({4B0A7290-36C2-4C74-B9B4-07775B031CF2}) | 45 | {4B0A7290-36C2-4C74-B9B4-07775B031CF2}.Release|Any CPU.ActiveCfg = Release|Any CPU |
46 | ({55969A66-0E92-4F76-BFF6-2256C6A5CAF7}).4 = ({BD7866A4-04BA-47F0-905F-B2359118F5B2}) | 46 | {4B0A7290-36C2-4C74-B9B4-07775B031CF2}.Release|Any CPU.Build.0 = Release|Any CPU |
47 | ({55969A66-0E92-4F76-BFF6-2256C6A5CAF7}).5 = ({4B0A7290-36C2-4C74-B9B4-07775B031CF2}) | 47 | {A6463B2D-0956-4680-9D03-082199779C66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
48 | ({0CE4ED02-8BB2-439C-8225-E42F2D661D44}).4 = ({4B0A7290-36C2-4C74-B9B4-07775B031CF2}) | 48 | {A6463B2D-0956-4680-9D03-082199779C66}.Debug|Any CPU.Build.0 = Debug|Any CPU |
49 | ({F23A90E8-FDED-4D8C-A1B9-2ABE0A8C8EB2}).2 = ({2EAB18A1-8187-4C79-9947-A671F9C007D9}) | 49 | {A6463B2D-0956-4680-9D03-082199779C66}.Release|Any CPU.ActiveCfg = Release|Any CPU |
50 | ({E168B13F-8D18-43E7-8546-C0EC1899579F}).2 = ({2EAB18A1-8187-4C79-9947-A671F9C007D9}) | 50 | {A6463B2D-0956-4680-9D03-082199779C66}.Release|Any CPU.Build.0 = Release|Any CPU |
51 | ({8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}).5 = ({BD7866A4-04BA-47F0-905F-B2359118F5B2}) | 51 | {98EC7DD5-BAB2-4678-AEA1-7C2B27B27BC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
52 | ({8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}).6 = ({4B0A7290-36C2-4C74-B9B4-07775B031CF2}) | 52 | {98EC7DD5-BAB2-4678-AEA1-7C2B27B27BC9}.Debug|Any CPU.Build.0 = Debug|Any CPU |
53 | ({8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}).7 = ({2EAB18A1-8187-4C79-9947-A671F9C007D9}) | 53 | {98EC7DD5-BAB2-4678-AEA1-7C2B27B27BC9}.Release|Any CPU.ActiveCfg = Release|Any CPU |
54 | ({8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}).8 = ({ADD974E2-994C-4998-864E-4B54D8AD5F00}) | 54 | {98EC7DD5-BAB2-4678-AEA1-7C2B27B27BC9}.Release|Any CPU.Build.0 = Release|Any CPU |
55 | ({ADD974E2-994C-4998-864E-4B54D8AD5F00}).5 = ({BD7866A4-04BA-47F0-905F-B2359118F5B2}) | 55 | {76C00C0A-1AEF-49C9-8E4E-19A529B364E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
56 | ({ADD974E2-994C-4998-864E-4B54D8AD5F00}).6 = ({4B0A7290-36C2-4C74-B9B4-07775B031CF2}) | 56 | {76C00C0A-1AEF-49C9-8E4E-19A529B364E8}.Debug|Any CPU.Build.0 = Debug|Any CPU |
57 | ({ADD974E2-994C-4998-864E-4B54D8AD5F00}).7 = ({2EAB18A1-8187-4C79-9947-A671F9C007D9}) | 57 | {76C00C0A-1AEF-49C9-8E4E-19A529B364E8}.Release|Any CPU.ActiveCfg = Release|Any CPU |
58 | ({ADD974E2-994C-4998-864E-4B54D8AD5F00}).8 = ({B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}) | 58 | {76C00C0A-1AEF-49C9-8E4E-19A529B364E8}.Release|Any CPU.Build.0 = Release|Any CPU |
59 | ({2EAB18A1-8187-4C79-9947-A671F9C007D9}).3 = ({BD7866A4-04BA-47F0-905F-B2359118F5B2}) | 59 | {55969A66-0E92-4F76-BFF6-2256C6A5CAF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
60 | ({2EAB18A1-8187-4C79-9947-A671F9C007D9}).4 = ({4B0A7290-36C2-4C74-B9B4-07775B031CF2}) | 60 | {55969A66-0E92-4F76-BFF6-2256C6A5CAF7}.Debug|Any CPU.Build.0 = Debug|Any CPU |
61 | ({CBC22F47-9CF2-4748-B6C6-85CDAB267554}).4 = ({BD7866A4-04BA-47F0-905F-B2359118F5B2}) | 61 | {55969A66-0E92-4F76-BFF6-2256C6A5CAF7}.Release|Any CPU.ActiveCfg = Release|Any CPU |
62 | ({CBC22F47-9CF2-4748-B6C6-85CDAB267554}).5 = ({4B0A7290-36C2-4C74-B9B4-07775B031CF2}) | 62 | {55969A66-0E92-4F76-BFF6-2256C6A5CAF7}.Release|Any CPU.Build.0 = Release|Any CPU |
63 | ({0EF13F92-86F1-403D-882A-AA9DD4421B32}).3 = ({2EAB18A1-8187-4C79-9947-A671F9C007D9}) | 63 | {BD7866A4-04BA-47F0-905F-B2359118F5B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
64 | EndGlobalSection | 64 | {BD7866A4-04BA-47F0-905F-B2359118F5B2}.Debug|Any CPU.Build.0 = Debug|Any CPU |
65 | GlobalSection(ProjectConfigurationPlatforms) = postSolution | 65 | {BD7866A4-04BA-47F0-905F-B2359118F5B2}.Release|Any CPU.ActiveCfg = Release|Any CPU |
66 | {B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | 66 | {BD7866A4-04BA-47F0-905F-B2359118F5B2}.Release|Any CPU.Build.0 = Release|Any CPU |
67 | {B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}.Debug|Any CPU.Build.0 = Debug|Any CPU | 67 | {0CE4ED02-8BB2-439C-8225-E42F2D661D44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
68 | {B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}.Release|Any CPU.ActiveCfg = Release|Any CPU | 68 | {0CE4ED02-8BB2-439C-8225-E42F2D661D44}.Debug|Any CPU.Build.0 = Debug|Any CPU |
69 | {B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}.Release|Any CPU.Build.0 = Release|Any CPU | 69 | {0CE4ED02-8BB2-439C-8225-E42F2D661D44}.Release|Any CPU.ActiveCfg = Release|Any CPU |
70 | {4B0A7290-36C2-4C74-B9B4-07775B031CF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | 70 | {0CE4ED02-8BB2-439C-8225-E42F2D661D44}.Release|Any CPU.Build.0 = Release|Any CPU |
71 | {4B0A7290-36C2-4C74-B9B4-07775B031CF2}.Debug|Any CPU.Build.0 = Debug|Any CPU | 71 | {F23A90E8-FDED-4D8C-A1B9-2ABE0A8C8EB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
72 | {4B0A7290-36C2-4C74-B9B4-07775B031CF2}.Release|Any CPU.ActiveCfg = Release|Any CPU | 72 | {F23A90E8-FDED-4D8C-A1B9-2ABE0A8C8EB2}.Debug|Any CPU.Build.0 = Debug|Any CPU |
73 | {4B0A7290-36C2-4C74-B9B4-07775B031CF2}.Release|Any CPU.Build.0 = Release|Any CPU | 73 | {F23A90E8-FDED-4D8C-A1B9-2ABE0A8C8EB2}.Release|Any CPU.ActiveCfg = Release|Any CPU |
74 | {A6463B2D-0956-4680-9D03-082199779C66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | 74 | {F23A90E8-FDED-4D8C-A1B9-2ABE0A8C8EB2}.Release|Any CPU.Build.0 = Release|Any CPU |
75 | {A6463B2D-0956-4680-9D03-082199779C66}.Debug|Any CPU.Build.0 = Debug|Any CPU | 75 | {E168B13F-8D18-43E7-8546-C0EC1899579F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
76 | {A6463B2D-0956-4680-9D03-082199779C66}.Release|Any CPU.ActiveCfg = Release|Any CPU | 76 | {E168B13F-8D18-43E7-8546-C0EC1899579F}.Debug|Any CPU.Build.0 = Debug|Any CPU |
77 | {A6463B2D-0956-4680-9D03-082199779C66}.Release|Any CPU.Build.0 = Release|Any CPU | 77 | {E168B13F-8D18-43E7-8546-C0EC1899579F}.Release|Any CPU.ActiveCfg = Release|Any CPU |
78 | {98EC7DD5-BAB2-4678-AEA1-7C2B27B27BC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | 78 | {E168B13F-8D18-43E7-8546-C0EC1899579F}.Release|Any CPU.Build.0 = Release|Any CPU |
79 | {98EC7DD5-BAB2-4678-AEA1-7C2B27B27BC9}.Debug|Any CPU.Build.0 = Debug|Any CPU | 79 | {8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
80 | {98EC7DD5-BAB2-4678-AEA1-7C2B27B27BC9}.Release|Any CPU.ActiveCfg = Release|Any CPU | 80 | {8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}.Debug|Any CPU.Build.0 = Debug|Any CPU |
81 | {98EC7DD5-BAB2-4678-AEA1-7C2B27B27BC9}.Release|Any CPU.Build.0 = Release|Any CPU | 81 | {8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}.Release|Any CPU.ActiveCfg = Release|Any CPU |
82 | {76C00C0A-1AEF-49C9-8E4E-19A529B364E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | 82 | {8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}.Release|Any CPU.Build.0 = Release|Any CPU |
83 | {76C00C0A-1AEF-49C9-8E4E-19A529B364E8}.Debug|Any CPU.Build.0 = Debug|Any CPU | 83 | {ADD974E2-994C-4998-864E-4B54D8AD5F00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
84 | {76C00C0A-1AEF-49C9-8E4E-19A529B364E8}.Release|Any CPU.ActiveCfg = Release|Any CPU | 84 | {ADD974E2-994C-4998-864E-4B54D8AD5F00}.Debug|Any CPU.Build.0 = Debug|Any CPU |
85 | {76C00C0A-1AEF-49C9-8E4E-19A529B364E8}.Release|Any CPU.Build.0 = Release|Any CPU | 85 | {ADD974E2-994C-4998-864E-4B54D8AD5F00}.Release|Any CPU.ActiveCfg = Release|Any CPU |
86 | {55969A66-0E92-4F76-BFF6-2256C6A5CAF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | 86 | {ADD974E2-994C-4998-864E-4B54D8AD5F00}.Release|Any CPU.Build.0 = Release|Any CPU |
87 | {55969A66-0E92-4F76-BFF6-2256C6A5CAF7}.Debug|Any CPU.Build.0 = Debug|Any CPU | 87 | {2EAB18A1-8187-4C79-9947-A671F9C007D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
88 | {55969A66-0E92-4F76-BFF6-2256C6A5CAF7}.Release|Any CPU.ActiveCfg = Release|Any CPU | 88 | {2EAB18A1-8187-4C79-9947-A671F9C007D9}.Debug|Any CPU.Build.0 = Debug|Any CPU |
89 | {55969A66-0E92-4F76-BFF6-2256C6A5CAF7}.Release|Any CPU.Build.0 = Release|Any CPU | 89 | {2EAB18A1-8187-4C79-9947-A671F9C007D9}.Release|Any CPU.ActiveCfg = Release|Any CPU |
90 | {BD7866A4-04BA-47F0-905F-B2359118F5B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | 90 | {2EAB18A1-8187-4C79-9947-A671F9C007D9}.Release|Any CPU.Build.0 = Release|Any CPU |
91 | {BD7866A4-04BA-47F0-905F-B2359118F5B2}.Debug|Any CPU.Build.0 = Debug|Any CPU | 91 | {CBC22F47-9CF2-4748-B6C6-85CDAB267554}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
92 | {BD7866A4-04BA-47F0-905F-B2359118F5B2}.Release|Any CPU.ActiveCfg = Release|Any CPU | 92 | {CBC22F47-9CF2-4748-B6C6-85CDAB267554}.Debug|Any CPU.Build.0 = Debug|Any CPU |
93 | {BD7866A4-04BA-47F0-905F-B2359118F5B2}.Release|Any CPU.Build.0 = Release|Any CPU | 93 | {CBC22F47-9CF2-4748-B6C6-85CDAB267554}.Release|Any CPU.ActiveCfg = Release|Any CPU |
94 | {0CE4ED02-8BB2-439C-8225-E42F2D661D44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | 94 | {CBC22F47-9CF2-4748-B6C6-85CDAB267554}.Release|Any CPU.Build.0 = Release|Any CPU |
95 | {0CE4ED02-8BB2-439C-8225-E42F2D661D44}.Debug|Any CPU.Build.0 = Debug|Any CPU | 95 | {0EF13F92-86F1-403D-882A-AA9DD4421B32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
96 | {0CE4ED02-8BB2-439C-8225-E42F2D661D44}.Release|Any CPU.ActiveCfg = Release|Any CPU | 96 | {0EF13F92-86F1-403D-882A-AA9DD4421B32}.Debug|Any CPU.Build.0 = Debug|Any CPU |
97 | {0CE4ED02-8BB2-439C-8225-E42F2D661D44}.Release|Any CPU.Build.0 = Release|Any CPU | 97 | {0EF13F92-86F1-403D-882A-AA9DD4421B32}.Release|Any CPU.ActiveCfg = Release|Any CPU |
98 | {F23A90E8-FDED-4D8C-A1B9-2ABE0A8C8EB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | 98 | {0EF13F92-86F1-403D-882A-AA9DD4421B32}.Release|Any CPU.Build.0 = Release|Any CPU |
99 | {F23A90E8-FDED-4D8C-A1B9-2ABE0A8C8EB2}.Debug|Any CPU.Build.0 = Debug|Any CPU | 99 | EndGlobalSection |
100 | {F23A90E8-FDED-4D8C-A1B9-2ABE0A8C8EB2}.Release|Any CPU.ActiveCfg = Release|Any CPU | 100 | GlobalSection(SolutionProperties) = preSolution |
101 | {F23A90E8-FDED-4D8C-A1B9-2ABE0A8C8EB2}.Release|Any CPU.Build.0 = Release|Any CPU | 101 | HideSolutionNode = FALSE |
102 | {E168B13F-8D18-43E7-8546-C0EC1899579F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | 102 | EndGlobalSection |
103 | {E168B13F-8D18-43E7-8546-C0EC1899579F}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
104 | {E168B13F-8D18-43E7-8546-C0EC1899579F}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
105 | {E168B13F-8D18-43E7-8546-C0EC1899579F}.Release|Any CPU.Build.0 = Release|Any CPU | ||
106 | {8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
107 | {8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
108 | {8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
109 | {8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}.Release|Any CPU.Build.0 = Release|Any CPU | ||
110 | {ADD974E2-994C-4998-864E-4B54D8AD5F00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
111 | {ADD974E2-994C-4998-864E-4B54D8AD5F00}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
112 | {ADD974E2-994C-4998-864E-4B54D8AD5F00}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
113 | {ADD974E2-994C-4998-864E-4B54D8AD5F00}.Release|Any CPU.Build.0 = Release|Any CPU | ||
114 | {2EAB18A1-8187-4C79-9947-A671F9C007D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
115 | {2EAB18A1-8187-4C79-9947-A671F9C007D9}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
116 | {2EAB18A1-8187-4C79-9947-A671F9C007D9}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
117 | {2EAB18A1-8187-4C79-9947-A671F9C007D9}.Release|Any CPU.Build.0 = Release|Any CPU | ||
118 | {CBC22F47-9CF2-4748-B6C6-85CDAB267554}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
119 | {CBC22F47-9CF2-4748-B6C6-85CDAB267554}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
120 | {CBC22F47-9CF2-4748-B6C6-85CDAB267554}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
121 | {CBC22F47-9CF2-4748-B6C6-85CDAB267554}.Release|Any CPU.Build.0 = Release|Any CPU | ||
122 | {0EF13F92-86F1-403D-882A-AA9DD4421B32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
123 | {0EF13F92-86F1-403D-882A-AA9DD4421B32}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
124 | {0EF13F92-86F1-403D-882A-AA9DD4421B32}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
125 | {0EF13F92-86F1-403D-882A-AA9DD4421B32}.Release|Any CPU.Build.0 = Release|Any CPU | ||
126 | EndGlobalSection | ||
127 | GlobalSection(SolutionProperties) = preSolution | ||
128 | HideSolutionNode = FALSE | ||
129 | EndGlobalSection | ||
130 | EndGlobal | 103 | EndGlobal |
diff --git a/OpenSim/RegionServer.cs b/OpenSim/RegionServer.cs index a0037b1..cebea82 100644 --- a/OpenSim/RegionServer.cs +++ b/OpenSim/RegionServer.cs | |||
@@ -8,69 +8,50 @@ namespace OpenSim | |||
8 | { | 8 | { |
9 | public class RegionServer : OpenSimMain | 9 | public class RegionServer : OpenSimMain |
10 | { | 10 | { |
11 | public RegionServer( ) : base( false, false, String.Empty ) | ||
12 | { | ||
13 | } | ||
14 | |||
11 | [STAThread] | 15 | [STAThread] |
12 | public static void Main(string[] args) | 16 | public static void Main(string[] args) |
13 | { | 17 | { |
14 | Console.WriteLine("OpenSim " + VersionInfo.Version + "\n"); | 18 | Console.WriteLine("OpenSim " + VersionInfo.Version + "\n"); |
15 | Console.WriteLine("Starting...\n"); | 19 | Console.WriteLine("Starting...\n"); |
16 | 20 | ||
17 | //OpenSimRoot.instance = new OpenSimRoot(); | 21 | bool sandBoxMode = false; |
18 | OpenSimMain sim = new OpenSimMain(); | 22 | bool startLoginServer = false; |
19 | OpenSimRoot.Instance.Application = sim; | 23 | string physicsEngine = "basicphysics"; |
24 | bool allowFlying = false; | ||
20 | 25 | ||
21 | sim.sandbox = false; | ||
22 | sim.loginserver = false; | ||
23 | sim._physicsEngine = "basicphysics"; | ||
24 | |||
25 | for (int i = 0; i < args.Length; i++) | 26 | for (int i = 0; i < args.Length; i++) |
26 | { | 27 | { |
27 | if (args[i] == "-sandbox") | 28 | if (args[i] == "-sandbox") |
28 | { | 29 | { |
29 | sim.sandbox = true; | 30 | sandBoxMode = true; |
30 | OpenSimRoot.Instance.Sandbox = true; | ||
31 | } | 31 | } |
32 | 32 | ||
33 | if (args[i] == "-loginserver") | 33 | if (args[i] == "-loginserver") |
34 | { | 34 | { |
35 | sim.loginserver = true; | 35 | startLoginServer = true; |
36 | } | 36 | } |
37 | if (args[i] == "-realphysx") | 37 | if (args[i] == "-realphysx") |
38 | { | 38 | { |
39 | sim._physicsEngine = "RealPhysX"; | 39 | physicsEngine = "RealPhysX"; |
40 | OpenSim.world.Avatar.PhysicsEngineFlying = true; | ||
41 | } | 40 | } |
42 | if (args[i] == "-ode") | 41 | if (args[i] == "-ode") |
43 | { | 42 | { |
44 | sim._physicsEngine = "OpenDynamicsEngine"; | 43 | physicsEngine = "OpenDynamicsEngine"; |
45 | OpenSim.world.Avatar.PhysicsEngineFlying = true; | 44 | allowFlying = true; |
46 | } | 45 | } |
47 | } | 46 | } |
48 | 47 | ||
48 | OpenSimMain sim = new OpenSimMain( sandBoxMode, startLoginServer, physicsEngine ); | ||
49 | OpenSimRoot.Instance.Application = sim; | ||
50 | OpenSimRoot.Instance.Sandbox = sandBoxMode; | ||
51 | OpenSim.world.Avatar.PhysicsEngineFlying = allowFlying; | ||
49 | 52 | ||
50 | OpenSimRoot.Instance.GridServers = new Grid(); | 53 | sim.StartUp(); |
51 | if (sim.sandbox) | ||
52 | { | ||
53 | OpenSimRoot.Instance.GridServers.AssetDll = "OpenSim.GridInterfaces.Local.dll"; | ||
54 | OpenSimRoot.Instance.GridServers.GridDll = "OpenSim.GridInterfaces.Local.dll"; | ||
55 | OpenSimRoot.Instance.GridServers.Initialise(); | ||
56 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Starting in Sandbox mode"); | ||
57 | } | ||
58 | else | ||
59 | { | ||
60 | OpenSimRoot.Instance.GridServers.AssetDll = "OpenSim.GridInterfaces.Remote.dll"; | ||
61 | OpenSimRoot.Instance.GridServers.GridDll = "OpenSim.GridInterfaces.Remote.dll"; | ||
62 | OpenSimRoot.Instance.GridServers.Initialise(); | ||
63 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Starting in Grid mode"); | ||
64 | } | ||
65 | |||
66 | OpenSimRoot.Instance.StartUp(); | ||
67 | 54 | ||
68 | if (sim.loginserver && sim.sandbox) | ||
69 | { | ||
70 | LoginServer loginServer = new LoginServer(OpenSimRoot.Instance.GridServers.GridServer, OpenSimRoot.Instance.Cfg.IPListenAddr, OpenSimRoot.Instance.Cfg.IPListenPort); | ||
71 | loginServer.Startup(); | ||
72 | } | ||
73 | |||
74 | while (true) | 55 | while (true) |
75 | { | 56 | { |
76 | OpenSim.Framework.Console.MainConsole.Instance.MainConsolePrompt(); | 57 | OpenSim.Framework.Console.MainConsole.Instance.MainConsolePrompt(); |