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/RegionServer.cs | |
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 'OpenSim/RegionServer.cs')
-rw-r--r-- | OpenSim/RegionServer.cs | 55 |
1 files changed, 18 insertions, 37 deletions
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(); |