Application.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using OpenSim.UserServer;
  5. using OpenSim.Framework.Console;
  6. namespace OpenSim
  7. {
  8. public class Application
  9. {
  10. [STAThread]
  11. public static void Main(string[] args)
  12. {
  13. Console.WriteLine("OpenSim " + VersionInfo.Version + "\n");
  14. Console.WriteLine("Starting...\n");
  15. bool sandBoxMode = false;
  16. bool startLoginServer = false;
  17. string physicsEngine = "basicphysics";
  18. bool allowFlying = false;
  19. bool userAccounts = false;
  20. for (int i = 0; i < args.Length; i++)
  21. {
  22. if (args[i] == "-sandbox")
  23. {
  24. sandBoxMode = true;
  25. }
  26. if (args[i] == "-loginserver")
  27. {
  28. startLoginServer = true;
  29. }
  30. if (args[i] == "-accounts")
  31. {
  32. userAccounts = true;
  33. }
  34. if (args[i] == "-realphysx")
  35. {
  36. physicsEngine = "RealPhysX";
  37. allowFlying = true;
  38. }
  39. if (args[i] == "-ode")
  40. {
  41. physicsEngine = "OpenDynamicsEngine";
  42. allowFlying = true;
  43. }
  44. }
  45. OpenSimMain sim = new OpenSimMain( sandBoxMode, startLoginServer, physicsEngine );
  46. // OpenSimRoot.Instance.Application = sim;
  47. sim.m_sandbox = sandBoxMode;
  48. sim.user_accounts = userAccounts;
  49. OpenSim.world.Avatar.PhysicsEngineFlying = allowFlying;
  50. sim.StartUp();
  51. while (true)
  52. {
  53. OpenSim.Framework.Console.MainConsole.Instance.MainConsolePrompt();
  54. }
  55. }
  56. }
  57. }