aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/RegionServer.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/RegionServer.cs55
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();