mirror of
git://opensimulator.org/git/opensim
synced 2026-08-15 17:42:16 +00:00
Currently the vm is at a early stage and very limited: currently only supports static methods (instance methods support is nearly finished though) currently a class can't have member variables, so currently only local variables in the methods. Also in this branch, connecting the vm to opensim is not completely finished: it is being uploaded just for viewing purposes.
65 lines
1.9 KiB
C#
65 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using OpenSim.UserServer;
|
|
using OpenSim.Framework.Console;
|
|
|
|
namespace OpenSim
|
|
{
|
|
public class Application
|
|
{
|
|
[STAThread]
|
|
public static void Main(string[] args)
|
|
{
|
|
Console.WriteLine("OpenSim " + VersionInfo.Version + "\n");
|
|
Console.WriteLine("Starting...\n");
|
|
|
|
bool sandBoxMode = false;
|
|
bool startLoginServer = false;
|
|
string physicsEngine = "basicphysics";
|
|
bool allowFlying = false;
|
|
bool userAccounts = false;
|
|
|
|
for (int i = 0; i < args.Length; i++)
|
|
{
|
|
if (args[i] == "-sandbox")
|
|
{
|
|
sandBoxMode = true;
|
|
}
|
|
|
|
if (args[i] == "-loginserver")
|
|
{
|
|
startLoginServer = true;
|
|
}
|
|
if (args[i] == "-accounts")
|
|
{
|
|
userAccounts = true;
|
|
}
|
|
if (args[i] == "-realphysx")
|
|
{
|
|
physicsEngine = "RealPhysX";
|
|
allowFlying = true;
|
|
}
|
|
if (args[i] == "-ode")
|
|
{
|
|
physicsEngine = "OpenDynamicsEngine";
|
|
allowFlying = true;
|
|
}
|
|
}
|
|
|
|
OpenSimMain sim = new OpenSimMain( sandBoxMode, startLoginServer, physicsEngine );
|
|
// OpenSimRoot.Instance.Application = sim;
|
|
sim.m_sandbox = sandBoxMode;
|
|
sim.user_accounts = userAccounts;
|
|
OpenSim.world.Avatar.PhysicsEngineFlying = allowFlying;
|
|
|
|
sim.StartUp();
|
|
|
|
while (true)
|
|
{
|
|
OpenSim.Framework.Console.MainConsole.Instance.MainConsolePrompt();
|
|
}
|
|
}
|
|
}
|
|
}
|