RegionServer.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 RegionServer
  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. }
  38. if (args[i] == "-ode")
  39. {
  40. physicsEngine = "OpenDynamicsEngine";
  41. allowFlying = true;
  42. }
  43. }
  44. OpenSimMain sim = new OpenSimMain( sandBoxMode, startLoginServer, physicsEngine );
  45. // OpenSimRoot.Instance.Application = sim;
  46. sim.m_sandbox = sandBoxMode;
  47. sim.user_accounts = userAccounts;
  48. OpenSim.world.Avatar.PhysicsEngineFlying = allowFlying;
  49. sim.StartUp();
  50. while (true)
  51. {
  52. OpenSim.Framework.Console.MainConsole.Instance.MainConsolePrompt();
  53. }
  54. }
  55. }
  56. }