From 76569ff4fba09f22ed4a06b8073deaed7f64a2e3 Mon Sep 17 00:00:00 2001 From: MW Date: Sat, 10 Mar 2007 20:30:25 +0000 Subject: A PhysX physics plugin (that actually uses physX now but currently only works on windows) Can now change direction when walking without stopping Flying works when using the Physx dll --- src/Main.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/Main.cs') diff --git a/src/Main.cs b/src/Main.cs index 600ce38..3103ea3 100644 --- a/src/Main.cs +++ b/src/Main.cs @@ -71,6 +71,7 @@ namespace OpenSim private PhysicsManager physManager; private System.Timers.Timer timer1 = new System.Timers.Timer(); private string ConfigDll = "SimConfig.dll"; + private string _physicsEngine = "PhysX"; public bool sandbox = false; public bool loginserver = false; @@ -93,6 +94,11 @@ namespace OpenSim { sim.loginserver = true; } + if(args[i] == "-realphysx") + { + sim._physicsEngine = "RealPhysX"; + OpenSim.world.Avatar.PhysicsEngineFlying = true; + } } OpenSim_Main.gridServers = new Grid(); @@ -148,7 +154,7 @@ namespace OpenSim this.physManager = new PhysicsSystem.PhysicsManager(); this.physManager.LoadPlugins(); ServerConsole.MainConsole.Instance.WriteLine("Main.cs:Startup() - Starting up messaging system"); - local_world.PhysScene = this.physManager.GetPhysicsScene("PhysX"); //should be reading from the config file what physics engine to use + local_world.PhysScene = this.physManager.GetPhysicsScene(this._physicsEngine); //should be reading from the config file what physics engine to use local_world.PhysScene.SetTerrain(local_world.LandMap); OpenSim_Main.gridServers.AssetServer.SetServerInfo(OpenSim_Main.cfg.AssetURL, OpenSim_Main.cfg.AssetSendKey); -- cgit v1.1