diff options
author | lbsa71 | 2007-04-03 20:31:46 +0000 |
---|---|---|
committer | lbsa71 | 2007-04-03 20:31:46 +0000 |
commit | d9ca66141629105c0b5c924aa51ebfcc2ebd5dc8 (patch) | |
tree | 79620e35ed07734271cf82cec172b3bd3c0e512f /OpenSim/Application.cs | |
parent | * The world can not contain ScriptFactories that creates unique instances of ... (diff) | |
download | opensim-SC-d9ca66141629105c0b5c924aa51ebfcc2ebd5dc8.zip opensim-SC-d9ca66141629105c0b5c924aa51ebfcc2ebd5dc8.tar.gz opensim-SC-d9ca66141629105c0b5c924aa51ebfcc2ebd5dc8.tar.bz2 opensim-SC-d9ca66141629105c0b5c924aa51ebfcc2ebd5dc8.tar.xz |
* Fixad namespace clash
Diffstat (limited to 'OpenSim/Application.cs')
-rw-r--r-- | OpenSim/Application.cs | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/OpenSim/Application.cs b/OpenSim/Application.cs new file mode 100644 index 0000000..34dbf8e --- /dev/null +++ b/OpenSim/Application.cs | |||
@@ -0,0 +1,64 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using OpenSim.UserServer; | ||
5 | using OpenSim.Framework.Console; | ||
6 | |||
7 | namespace OpenSim | ||
8 | { | ||
9 | public class Application | ||
10 | { | ||
11 | [STAThread] | ||
12 | public static void Main(string[] args) | ||
13 | { | ||
14 | Console.WriteLine("OpenSim " + VersionInfo.Version + "\n"); | ||
15 | Console.WriteLine("Starting...\n"); | ||
16 | |||
17 | bool sandBoxMode = false; | ||
18 | bool startLoginServer = false; | ||
19 | string physicsEngine = "basicphysics"; | ||
20 | bool allowFlying = false; | ||
21 | bool userAccounts = false; | ||
22 | |||
23 | for (int i = 0; i < args.Length; i++) | ||
24 | { | ||
25 | if (args[i] == "-sandbox") | ||
26 | { | ||
27 | sandBoxMode = true; | ||
28 | } | ||
29 | |||
30 | if (args[i] == "-loginserver") | ||
31 | { | ||
32 | startLoginServer = true; | ||
33 | } | ||
34 | if (args[i] == "-accounts") | ||
35 | { | ||
36 | userAccounts = true; | ||
37 | } | ||
38 | if (args[i] == "-realphysx") | ||
39 | { | ||
40 | physicsEngine = "RealPhysX"; | ||
41 | allowFlying = true; | ||
42 | } | ||
43 | if (args[i] == "-ode") | ||
44 | { | ||
45 | physicsEngine = "OpenDynamicsEngine"; | ||
46 | allowFlying = true; | ||
47 | } | ||
48 | } | ||
49 | |||
50 | OpenSimMain sim = new OpenSimMain( sandBoxMode, startLoginServer, physicsEngine ); | ||
51 | // OpenSimRoot.Instance.Application = sim; | ||
52 | sim.m_sandbox = sandBoxMode; | ||
53 | sim.user_accounts = userAccounts; | ||
54 | OpenSim.world.Avatar.PhysicsEngineFlying = allowFlying; | ||
55 | |||
56 | sim.StartUp(); | ||
57 | |||
58 | while (true) | ||
59 | { | ||
60 | OpenSim.Framework.Console.MainConsole.Instance.MainConsolePrompt(); | ||
61 | } | ||
62 | } | ||
63 | } | ||
64 | } | ||