diff options
author | lbsa71 | 2007-03-24 08:06:41 +0000 |
---|---|---|
committer | lbsa71 | 2007-03-24 08:06:41 +0000 |
commit | 50f5686d918dbd519f21c0c611bea3f28daf4657 (patch) | |
tree | 769f71b6f5854b524fd5895fc05718da6a1991da /OpenSim/RegionServer.cs | |
parent | Added Fly animation (diff) | |
download | opensim-SC_OLD-50f5686d918dbd519f21c0c611bea3f28daf4657.zip opensim-SC_OLD-50f5686d918dbd519f21c0c611bea3f28daf4657.tar.gz opensim-SC_OLD-50f5686d918dbd519f21c0c611bea3f28daf4657.tar.bz2 opensim-SC_OLD-50f5686d918dbd519f21c0c611bea3f28daf4657.tar.xz |
* Added separate exe project
* Prebuild exe is now built in /bin dir
Diffstat (limited to 'OpenSim/RegionServer.cs')
-rw-r--r-- | OpenSim/RegionServer.cs | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/OpenSim/RegionServer.cs b/OpenSim/RegionServer.cs new file mode 100644 index 0000000..6fabe3f --- /dev/null +++ b/OpenSim/RegionServer.cs | |||
@@ -0,0 +1,75 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using OpenSim.UserServer; | ||
5 | |||
6 | namespace OpenSim | ||
7 | { | ||
8 | public class RegionServer : OpenSimMain | ||
9 | { | ||
10 | [STAThread] | ||
11 | public static void Main(string[] args) | ||
12 | { | ||
13 | Console.WriteLine("OpenSim " + VersionInfo.Version + "\n"); | ||
14 | Console.WriteLine("Starting...\n"); | ||
15 | OpenSim.Framework.Console.MainConsole.Instance = new SimConsole(OpenSim.Framework.Console.ConsoleBase.ConsoleType.Local, "", 0); | ||
16 | |||
17 | //OpenSimRoot.instance = new OpenSimRoot(); | ||
18 | OpenSimMain sim = new OpenSimMain(); | ||
19 | OpenSimRoot.Instance.Application = sim; | ||
20 | |||
21 | sim.sandbox = false; | ||
22 | sim.loginserver = false; | ||
23 | sim._physicsEngine = "basicphysics"; | ||
24 | |||
25 | for (int i = 0; i < args.Length; i++) | ||
26 | { | ||
27 | if (args[i] == "-sandbox") | ||
28 | { | ||
29 | sim.sandbox = true; | ||
30 | OpenSimRoot.Instance.Sandbox = true; | ||
31 | } | ||
32 | |||
33 | if (args[i] == "-loginserver") | ||
34 | { | ||
35 | sim.loginserver = true; | ||
36 | } | ||
37 | if (args[i] == "-realphysx") | ||
38 | { | ||
39 | sim._physicsEngine = "RealPhysX"; | ||
40 | OpenSim.world.Avatar.PhysicsEngineFlying = true; | ||
41 | } | ||
42 | } | ||
43 | |||
44 | |||
45 | OpenSimRoot.Instance.GridServers = new Grid(); | ||
46 | if (sim.sandbox) | ||
47 | { | ||
48 | OpenSimRoot.Instance.GridServers.AssetDll = "OpenSim.GridInterfaces.Local.dll"; | ||
49 | OpenSimRoot.Instance.GridServers.GridDll = "OpenSim.GridInterfaces.Local.dll"; | ||
50 | OpenSimRoot.Instance.GridServers.Initialise(); | ||
51 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Starting in Sandbox mode"); | ||
52 | } | ||
53 | else | ||
54 | { | ||
55 | OpenSimRoot.Instance.GridServers.AssetDll = "OpenSim.GridInterfaces.Remote.dll"; | ||
56 | OpenSimRoot.Instance.GridServers.GridDll = "OpenSim.GridInterfaces.Remote.dll"; | ||
57 | OpenSimRoot.Instance.GridServers.Initialise(); | ||
58 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Starting in Grid mode"); | ||
59 | } | ||
60 | |||
61 | if (sim.loginserver && sim.sandbox) | ||
62 | { | ||
63 | LoginServer loginServer = new LoginServer(OpenSimRoot.Instance.GridServers.GridServer); | ||
64 | loginServer.Startup(); | ||
65 | } | ||
66 | |||
67 | OpenSimRoot.Instance.StartUp(); | ||
68 | |||
69 | while (true) | ||
70 | { | ||
71 | OpenSim.Framework.Console.MainConsole.Instance.MainConsolePrompt(); | ||
72 | } | ||
73 | } | ||
74 | } | ||
75 | } | ||